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
MinhyunAhn
2022-10-17 17:54:30 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6cb7adaf4827fc50800a90f89a4da8c4048d4d89
6cb7adaf
1 parent
d775bb10
fix : check themeData transition
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
15 deletions
lib/get_navigation/src/root/root_controller.dart
lib/get_navigation/src/root/root_controller.dart
View file @
6cb7ada
...
...
@@ -104,20 +104,13 @@ class GetMaterialController extends FullLifeCycleController {
notFoundRoute:
config
.
unknownRoute
,
navigatorKey:
config
.
navigatorKey
,
navigatorObservers:
(
config
.
navigatorObservers
==
null
?
<
NavigatorObserver
>[
GetObserver
(
config
.
routingCallback
,
Get
.
routing
)
]
:
<
NavigatorObserver
>[
GetObserver
(
config
.
routingCallback
,
routing
),
...
config
.
navigatorObservers
!
]),
?
<
NavigatorObserver
>[
GetObserver
(
config
.
routingCallback
,
Get
.
routing
)]
:
<
NavigatorObserver
>[
GetObserver
(
config
.
routingCallback
,
routing
),
...
config
.
navigatorObservers
!]),
);
routeInformationParser
=
config
.
routeInformationParser
??
createInformationParser
(
initialRoute:
config
.
initialRoute
??
config
.
getPages
?.
first
.
name
??
cleanRouteName
(
"/
${config.home.runtimeType}
"
),
initialRoute:
config
.
initialRoute
??
config
.
getPages
?.
first
.
name
??
cleanRouteName
(
"/
${config.home.runtimeType}
"
),
);
if
(
config
.
locale
!=
null
)
Get
.
locale
=
config
.
locale
;
...
...
@@ -140,17 +133,33 @@ class GetMaterialController extends FullLifeCycleController {
Get
.
isLogEnable
=
config
.
enableLog
??
kDebugMode
;
Get
.
log
=
config
.
logWriterCallback
??
defaultLogWriterCallback
;
defaultTransition
=
config
.
defaultTransition
;
defaultTransition
=
config
.
defaultTransition
??
getThemeTransition
()
;
defaultOpaqueRoute
=
config
.
opaqueRoute
??
true
;
defaultPopGesture
=
config
.
popGesture
??
GetPlatform
.
isIOS
;
defaultTransitionDuration
=
config
.
transitionDuration
??
Duration
(
milliseconds:
300
);
defaultTransitionDuration
=
config
.
transitionDuration
??
Duration
(
milliseconds:
300
);
// defaultTransitionCurve = Curves.easeOutQuad;
// defaultDialogTransitionCurve = Curves.easeOutQuad;
// defaultDialogTransitionDuration = Duration(milliseconds: 300);
}
getThemeTransition
()
{
final
platform
=
Get
.
theme
.
platform
;
final
matchingTransition
=
Get
.
theme
.
pageTransitionsTheme
.
builders
[
platform
];
switch
(
matchingTransition
)
{
case
CupertinoPageTransitionsBuilder
():
return
Transition
.
cupertino
;
case
ZoomPageTransitionsBuilder
():
return
Transition
.
zoom
;
case
FadeUpwardsPageTransitionsBuilder
():
return
Transition
.
fade
;
case
OpenUpwardsPageTransitionsBuilder
():
return
Transition
.
native
;
default
:
return
null
;
}
}
String
cleanRouteName
(
String
name
)
{
name
=
name
.
replaceAll
(
'() => '
,
''
);
...
...
@@ -256,8 +265,7 @@ class GetMaterialController extends FullLifeCycleController {
List
<
NavigatorObserver
>?
navigatorObservers
,
TransitionDelegate
<
dynamic
>?
transitionDelegate
,
PopMode
backButtonPopMode
=
PopMode
.
history
,
PreventDuplicateHandlingMode
preventDuplicateHandlingMode
=
PreventDuplicateHandlingMode
.
reorderRoutes
,
PreventDuplicateHandlingMode
preventDuplicateHandlingMode
=
PreventDuplicateHandlingMode
.
reorderRoutes
,
GlobalKey
<
NavigatorState
>?
navigatorKey
,
})
{
return
GetDelegate
(
...
...
Please
register
or
login
to post a comment