Skip to content

Instantly share code, notes, and snippets.

@ShivamGoyal1899
Created July 18, 2019 06:37
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 ShivamGoyal1899/1160b634e13f9be438067f39bff11f7f to your computer and use it in GitHub Desktop.
Save ShivamGoyal1899/1160b634e13f9be438067f39bff11f7f to your computer and use it in GitHub Desktop.
class ProductListTab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
child: Consumer<AppStateModel>(
builder: (context, child, model) {
final products = model.getProducts(); // NEW
return CustomScrollView(
semanticChildCount: products.length, // NEW
slivers: <Widget>[
CupertinoSliverNavigationBar(
largeTitle: const Text('Cupertino Store'),
),
],
);
},
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment