import 'package:flutter/material.dart';
class HomeScreen extends StatefulWidget {
@override
_HomeScreenState createState() => _HomeScreenState();
}
class _HomeScreenState extends State<HomeScreen> {
final userList = [
'Ram',
'Dharmendra',
'Jiten',
'Umesh',
'Sanjay',
'Prakash',
'Sanjay',
'Shyam',
'Mukesh',
'Lalit',
'Anil',
'Sunil',
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
'Card',
),
centerTitle: true,
elevation: 0.0,
),
body: ListView.builder(
itemCount: userList.length,
itemBuilder: (BuildContext context, int index) {
return Container(
margin: EdgeInsets.only(bottom: 10.0),
child: Card(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
ListTile(
leading: Icon(Icons.album),
title: Text(userList[index]),
subtitle:
Text('Music By Julie Bable. Lyrics by Sindey Stein '),
),
ButtonBar(
children: [
FlatButton(
onPressed: () {},
child: const Text('BUY TICKETS'),
),
FlatButton(
onPressed: () {},
child: const Text('LISTEN'),
),
],
),
],
),
),
);
},
),
);
}
}
Output:
0 comments:
Post a Comment