Showing
2 changed files
with
8 additions
and
6 deletions
1 | + | ||
2 | +import 'package:flutter/foundation.dart'; | ||
1 | import 'package:get/instance_manager.dart'; | 3 | import 'package:get/instance_manager.dart'; |
2 | import 'dart:developer' as developer; | 4 | import 'dart:developer' as developer; |
3 | 5 | ||
4 | -typedef LogWriterCallback = void Function(String text, {String name, bool isError}); | 6 | +typedef LogWriterCallback = void Function(String text, {@required String name, bool isError}); |
5 | 7 | ||
6 | -void defaultLogWriterCallback(String value, {String name, bool isError = false}) { | 8 | +void defaultLogWriterCallback(String value, {@required String name, bool isError = false}) { |
7 | if (isError || GetConfig.isLogEnable) developer.log(value, name: name); | 9 | if (isError || GetConfig.isLogEnable) developer.log(value, name: name); |
8 | } | 10 | } |
@@ -72,13 +72,13 @@ class GetObserver extends NavigatorObserver { | @@ -72,13 +72,13 @@ class GetObserver extends NavigatorObserver { | ||
72 | String routeName = name(route); | 72 | String routeName = name(route); |
73 | 73 | ||
74 | if (isSnackbar) { | 74 | if (isSnackbar) { |
75 | - GetConfig.log("[GETX] OPEN SNACKBAR $routeName"); | 75 | + GetConfig.log("OPEN SNACKBAR $routeName", name: '[GETX]'); |
76 | } else if (isBottomSheet) { | 76 | } else if (isBottomSheet) { |
77 | - GetConfig.log("[GETX] OPEN $routeName"); | 77 | + GetConfig.log("OPEN $routeName", name: '[GETX]'); |
78 | } else if (isDialog) { | 78 | } else if (isDialog) { |
79 | - GetConfig.log("[GETX] OPEN $routeName"); | 79 | + GetConfig.log("OPEN $routeName", name: '[GETX]'); |
80 | } else if (isGetPageRoute) { | 80 | } else if (isGetPageRoute) { |
81 | - GetConfig.log("[GETX] GOING TO ROUTE $routeName"); | 81 | + GetConfig.log("GOING TO ROUTE $routeName", name: '[GETX]'); |
82 | } | 82 | } |
83 | GetConfig.currentRoute = routeName; | 83 | GetConfig.currentRoute = routeName; |
84 | 84 |
-
Please register or login to post a comment