diff --git a/lib/backend/notifications/notification_service.dart b/lib/backend/notifications/notification_service.dart index c771a378..36284d57 100644 --- a/lib/backend/notifications/notification_service.dart +++ b/lib/backend/notifications/notification_service.dart @@ -43,7 +43,7 @@ Future onMessageReceived(Map payload, String? extra, Stri switch (handleClick) { case 'visit_request': showDialog( - context: StorageHelper().context!, + context: navigatorKey.currentContext!, barrierColor: Colors.transparent, barrierDismissible: true, builder: (BuildContext context) { @@ -162,7 +162,7 @@ Future onMessageReceived(Map payload, String? extra, Stri break; case 'access': showDialog( - context: StorageHelper().context!, + context: navigatorKey.currentContext!, barrierColor: Colors.transparent, barrierDismissible: true, builder: (BuildContext context) { @@ -219,7 +219,7 @@ Future onMessageReceived(Map payload, String? extra, Stri break; case 'mensagem': showDialog( - context: StorageHelper().context!, + context: navigatorKey.currentContext!, barrierColor: Colors.transparent, barrierDismissible: true, builder: (BuildContext context) { @@ -240,7 +240,7 @@ Future onMessageReceived(Map payload, String? extra, Stri break; case 'enroll_cond': await StorageHelper().set(SecureStorageKey.haveLocal.value, true); - StorageHelper().context!.go('/homePage'); + navigatorKey.currentContext!.go('/homePage'); break; default: break; diff --git a/lib/flutter_flow/flutter_flow_button_tabbar.dart b/lib/flutter_flow/flutter_flow_button_tabbar.dart index 45bee44f..d8860120 100644 --- a/lib/flutter_flow/flutter_flow_button_tabbar.dart +++ b/lib/flutter_flow/flutter_flow_button_tabbar.dart @@ -586,7 +586,7 @@ class _FlutterFlowButtonTabBarState extends State with } Widget _buildStyledTab(Widget child, int index) { - final TabBarTheme tabBarTheme = TabBarTheme.of(context); + final TabBarTheme tabBarTheme = TabBarTheme.of(context) as TabBarTheme; final double animationValue; if (index == _currentIndex) {