Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
fluttertpc_get
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Ahmed Masoud
2021-09-13 01:10:19 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
012d7b507251d7be11d85c86b3a502e0732ebe54
012d7b50
1 parent
e2deef50
enable logs on debug instead of always
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
10 deletions
lib/get_core/src/get_interface.dart
lib/get_core/src/log.dart
lib/get_navigation/src/root/get_cupertino_app.dart
lib/get_navigation/src/root/get_material_app.dart
lib/get_core/src/get_interface.dart
View file @
012d7b5
import
'package:flutter/foundation.dart'
;
import
'package:flutter/widgets.dart'
;
import
'log.dart'
;
...
...
@@ -9,6 +10,6 @@ abstract class GetInterface {
SmartManagement
smartManagement
=
SmartManagement
.
full
;
RouterDelegate
?
routerDelegate
;
RouteInformationParser
?
routeInformationParser
;
bool
isLogEnable
=
tru
e
;
bool
isLogEnable
=
kDebugMod
e
;
LogWriterCallback
log
=
defaultLogWriterCallback
;
}
...
...
lib/get_core/src/log.dart
View file @
012d7b5
import
'dart:developer'
as
developer
;
import
'get_main.dart'
;
///Void
c
allback from logs
///Void
C
allback from logs
typedef
LogWriterCallback
=
void
Function
(
String
text
,
{
bool
isError
});
/// default logger from GetX
...
...
lib/get_navigation/src/root/get_cupertino_app.dart
View file @
012d7b5
...
...
@@ -52,7 +52,7 @@ class GetCupertinoApp extends StatelessWidget {
this
.
onReady
,
this
.
getPages
,
this
.
opaqueRoute
,
this
.
enableLog
,
this
.
enableLog
=
kDebugMode
,
this
.
logWriterCallback
,
this
.
popGesture
,
this
.
transitionDuration
,
...
...
@@ -154,7 +154,7 @@ class GetCupertinoApp extends StatelessWidget {
this
.
onInit
,
this
.
onReady
,
this
.
onDispose
,
this
.
enableLog
,
this
.
enableLog
=
kDebugMode
,
this
.
logWriterCallback
,
this
.
popGesture
,
this
.
smartManagement
=
SmartManagement
.
full
,
...
...
lib/get_navigation/src/root/get_material_app.dart
View file @
012d7b5
...
...
@@ -55,7 +55,7 @@ class GetMaterialApp extends StatelessWidget {
this
.
defaultTransition
,
this
.
getPages
,
this
.
opaqueRoute
,
this
.
enableLog
,
this
.
enableLog
=
kDebugMode
,
this
.
logWriterCallback
,
this
.
popGesture
,
this
.
transitionDuration
,
...
...
@@ -170,7 +170,7 @@ class GetMaterialApp extends StatelessWidget {
this
.
onInit
,
this
.
onReady
,
this
.
onDispose
,
this
.
enableLog
,
this
.
enableLog
=
kDebugMode
,
this
.
logWriterCallback
,
this
.
popGesture
,
this
.
smartManagement
=
SmartManagement
.
full
,
...
...
@@ -298,13 +298,15 @@ class GetMaterialApp extends StatelessWidget {
)
:
MaterialApp
(
key:
_
.
unikey
,
navigatorKey:
(
navigatorKey
==
null
?
Get
.
key
:
Get
.
addKey
(
navigatorKey
!)),
navigatorKey:
(
navigatorKey
==
null
?
Get
.
key
:
Get
.
addKey
(
navigatorKey
!)),
scaffoldMessengerKey:
scaffoldMessengerKey
,
home:
home
,
routes:
routes
??
const
<
String
,
WidgetBuilder
>{},
initialRoute:
initialRoute
,
onGenerateRoute:
(
getPages
!=
null
?
generator
:
onGenerateRoute
),
onGenerateRoute:
(
getPages
!=
null
?
generator
:
onGenerateRoute
),
onGenerateInitialRoutes:
(
getPages
==
null
||
home
!=
null
)
?
onGenerateInitialRoutes
:
initialRoutesGenerate
,
...
...
@@ -339,5 +341,6 @@ class GetMaterialApp extends StatelessWidget {
shortcuts:
shortcuts
,
scrollBehavior:
scrollBehavior
,
// actions: actions,
));
),
);
}
...
...
Please
register
or
login
to post a comment