Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created February 8, 2021 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azamsharp/c27263091b55547937e4df0553a8a7ca to your computer and use it in GitHub Desktop.
Save azamsharp/c27263091b55547937e4df0553a8a7ca to your computer and use it in GitHub Desktop.
class CustomerListScreen extends StatelessWidget {
final customers = ["Alex", "John", "Bryan", "Jerry", "Mary"];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Customers")
),
body: CustomerList(customers: customers, onSelected: (customer) {
Navigator.push(context, MaterialPageRoute(
builder: (context) => CustomerDetailScreen(customer: customer)
));
})
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment