Skip to content

Instantly share code, notes, and snippets.

@NITIN-ME

NITIN-ME/main.dart

Created Jun 30, 2020
Embed
What would you like to do?
class InvitePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.orange,
title: Center(
child: Text(
'Party Invite',
style: TextStyle(
fontFamily: 'cursive',
fontSize: 32,
color: Colors.black,
),
)
),
),
body: MyInvites(),
);
}
}
class MyInvites extends StatelessWidget {
@override
Widget build(BuildContext context) {
List<String> args = ModalRoute.of(context).settings.arguments;
print(args);
return ListView.builder(
itemCount: args.length,
itemBuilder: (context, index) {
return ListTile(
title: Text(args[index]),
leading: CircleAvatar(child: Text(args[index][0]),),
);
},
);;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment