From 529f066482844dd7b454acb1120bed9ae3a0aad3 Mon Sep 17 00:00:00 2001 From: jantunesmessias Date: Tue, 17 Dec 2024 17:27:45 -0300 Subject: [PATCH] =?UTF-8?q?fix=20abertura=20de=20modal=20de=20notifica?= =?UTF-8?q?=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/backend/notifications/notification_service.dart | 8 ++++---- lib/flutter_flow/flutter_flow_button_tabbar.dart | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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) {