Cupertino nav bar transitions between routes (#20322)

This commit is contained in:
xster
2018-08-28 16:44:34 -07:00
committed by GitHub
parent 05b4bd748c
commit f23c9ae5f8
13 changed files with 2827 additions and 342 deletions

View File

@@ -55,7 +55,11 @@ class _CupertinoRefreshControlDemoState extends State<CupertinoRefreshControlDem
new CupertinoSliverRefreshControl(
onRefresh: () {
return new Future<void>.delayed(const Duration(seconds: 2))
..then((_) => setState(() => repopulateList()));
..then((_) {
if (mounted) {
setState(() => repopulateList());
}
});
},
),
new SliverSafeArea(