diff --git a/lib/screens/home_screen.dart b/lib/screens/home_screen.dart index 23c01d4..2b5bd0d 100644 --- a/lib/screens/home_screen.dart +++ b/lib/screens/home_screen.dart @@ -113,9 +113,9 @@ class _HomeScreenState extends State context, MaterialPageRoute( builder: (context) => Provider( - builder: (_) => SearchBloc(), - child: SearchScreen(), - ), + builder: (_) => SearchBloc(), + child: SearchScreen(), + ), ), ) : print('Not online, searching is unavailable'); @@ -216,9 +216,9 @@ class _HomeScreenState extends State context, MaterialPageRoute( builder: (context) => Provider( - builder: (_) => SearchBloc(), - child: SearchScreen(), - ), + builder: (_) => SearchBloc(), + child: SearchScreen(), + ), ), ) : print('Not online, searching is unavailable'); @@ -237,9 +237,9 @@ class _HomeScreenState extends State context, MaterialPageRoute( builder: (context) => Provider( - child: SuggestionsScreen(), - builder: (_) => SuggestionsBloc(), - ), + child: SuggestionsScreen(), + builder: (_) => SuggestionsBloc(), + ), ), ) : print('Not online, suggestions are unavailable'); @@ -368,10 +368,13 @@ class _HomeScreenState extends State _firebaseMessaging = new FirebaseMessaging() ..configure(onMessage: (Map message) { _addNotificationAction(context, message); + return null; }, onResume: (Map message) { _addNotificationAction(context, message); + return null; }, onLaunch: (Map message) { _addNotificationAction(context, message); + return null; }); _firebaseMessaging.getToken().then((token) { print('Firebase Message token: $token'); @@ -426,6 +429,7 @@ class _HomeScreenState extends State // next page should be fetched movieBloc.fetchNextPageIn.add(movieType); } + return true; }, child: snapshot.hasData ? gridEnabled