Showing
2 changed files
with
10 additions
and
7 deletions
1 | import 'dart:developer' as developer; | 1 | import 'dart:developer' as developer; |
2 | import 'get_main.dart'; | 2 | import 'get_main.dart'; |
3 | 3 | ||
4 | -///Voidcallback from logs | 4 | +///VoidCallback from logs |
5 | typedef LogWriterCallback = void Function(String text, {bool isError}); | 5 | typedef LogWriterCallback = void Function(String text, {bool isError}); |
6 | 6 | ||
7 | /// default logger from GetX | 7 | /// default logger from GetX |
@@ -55,7 +55,7 @@ class GetMaterialApp extends StatelessWidget { | @@ -55,7 +55,7 @@ class GetMaterialApp extends StatelessWidget { | ||
55 | this.defaultTransition, | 55 | this.defaultTransition, |
56 | this.getPages, | 56 | this.getPages, |
57 | this.opaqueRoute, | 57 | this.opaqueRoute, |
58 | - this.enableLog, | 58 | + this.enableLog = kDebugMode, |
59 | this.logWriterCallback, | 59 | this.logWriterCallback, |
60 | this.popGesture, | 60 | this.popGesture, |
61 | this.transitionDuration, | 61 | this.transitionDuration, |
@@ -170,7 +170,7 @@ class GetMaterialApp extends StatelessWidget { | @@ -170,7 +170,7 @@ class GetMaterialApp extends StatelessWidget { | ||
170 | this.onInit, | 170 | this.onInit, |
171 | this.onReady, | 171 | this.onReady, |
172 | this.onDispose, | 172 | this.onDispose, |
173 | - this.enableLog, | 173 | + this.enableLog = kDebugMode, |
174 | this.logWriterCallback, | 174 | this.logWriterCallback, |
175 | this.popGesture, | 175 | this.popGesture, |
176 | this.smartManagement = SmartManagement.full, | 176 | this.smartManagement = SmartManagement.full, |
@@ -298,13 +298,15 @@ class GetMaterialApp extends StatelessWidget { | @@ -298,13 +298,15 @@ class GetMaterialApp extends StatelessWidget { | ||
298 | ) | 298 | ) |
299 | : MaterialApp( | 299 | : MaterialApp( |
300 | key: _.unikey, | 300 | key: _.unikey, |
301 | - navigatorKey: | ||
302 | - (navigatorKey == null ? Get.key : Get.addKey(navigatorKey!)), | 301 | + navigatorKey: (navigatorKey == null |
302 | + ? Get.key | ||
303 | + : Get.addKey(navigatorKey!)), | ||
303 | scaffoldMessengerKey: scaffoldMessengerKey, | 304 | scaffoldMessengerKey: scaffoldMessengerKey, |
304 | home: home, | 305 | home: home, |
305 | routes: routes ?? const <String, WidgetBuilder>{}, | 306 | routes: routes ?? const <String, WidgetBuilder>{}, |
306 | initialRoute: initialRoute, | 307 | initialRoute: initialRoute, |
307 | - onGenerateRoute: (getPages != null ? generator : onGenerateRoute), | 308 | + onGenerateRoute: |
309 | + (getPages != null ? generator : onGenerateRoute), | ||
308 | onGenerateInitialRoutes: (getPages == null || home != null) | 310 | onGenerateInitialRoutes: (getPages == null || home != null) |
309 | ? onGenerateInitialRoutes | 311 | ? onGenerateInitialRoutes |
310 | : initialRoutesGenerate, | 312 | : initialRoutesGenerate, |
@@ -339,5 +341,6 @@ class GetMaterialApp extends StatelessWidget { | @@ -339,5 +341,6 @@ class GetMaterialApp extends StatelessWidget { | ||
339 | shortcuts: shortcuts, | 341 | shortcuts: shortcuts, |
340 | scrollBehavior: scrollBehavior, | 342 | scrollBehavior: scrollBehavior, |
341 | // actions: actions, | 343 | // actions: actions, |
342 | - )); | 344 | + ), |
345 | + ); | ||
343 | } | 346 | } |
-
Please register or login to post a comment