Showing
1 changed file
with
4 additions
and
7 deletions
| @@ -1059,7 +1059,7 @@ extension GetNavigationExt on GetInterface { | @@ -1059,7 +1059,7 @@ extension GetNavigationExt on GetInterface { | ||
| 1059 | /// Your entire application will be rebuilt, and touch events will not | 1059 | /// Your entire application will be rebuilt, and touch events will not |
| 1060 | /// work until the end of rendering. | 1060 | /// work until the end of rendering. |
| 1061 | Future<void> forceAppUpdate() async { | 1061 | Future<void> forceAppUpdate() async { |
| 1062 | - await engine!.performReassemble(); | 1062 | + await engine.performReassemble(); |
| 1063 | } | 1063 | } |
| 1064 | 1064 | ||
| 1065 | void appUpdate() => _getxController.update(); | 1065 | void appUpdate() => _getxController.update(); |
| @@ -1173,12 +1173,9 @@ extension GetNavigationExt on GetInterface { | @@ -1173,12 +1173,9 @@ extension GetNavigationExt on GetInterface { | ||
| 1173 | return _theme; | 1173 | return _theme; |
| 1174 | } | 1174 | } |
| 1175 | 1175 | ||
| 1176 | - ///The current [WidgetsBinding] | ||
| 1177 | - WidgetsBinding? get engine { | ||
| 1178 | - if (WidgetsBinding.instance == null) { | ||
| 1179 | - WidgetsFlutterBinding(); | ||
| 1180 | - } | ||
| 1181 | - return WidgetsBinding.instance; | 1176 | + /// The current null safe [WidgetsBinding] |
| 1177 | + WidgetsBinding get engine { | ||
| 1178 | + return WidgetsFlutterBinding.ensureInitialized(); | ||
| 1182 | } | 1179 | } |
| 1183 | 1180 | ||
| 1184 | /// The window to which this binding is bound. | 1181 | /// The window to which this binding is bound. |
-
Please register or login to post a comment