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
Jonny Borges
2022-11-06 14:01:42 -0300
Browse Files
Options
Browse Files
Download
Plain Diff
Committed by
GitHub
2022-11-06 14:01:42 -0300
Commit
8555848dfdcba0f9519bedd3f30a0518f1d8255d
8555848d
2 parents
7e90b4a3
efb64ebf
Merge pull request #2607 from jonataslaw/improve-speed
Improve speed
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
146 additions
and
186 deletions
example/lib/pages/home/domain/entity/cases_model.dart
example/test/main_test.dart
example_nav2/ios/Flutter/AppFrameworkInfo.plist
example_nav2/ios/Flutter/Generated.xcconfig
example_nav2/ios/Runner.xcodeproj/project.pbxproj
lib/get_connect/http/src/request/request.dart
lib/get_instance/src/extension_instance.dart
lib/get_instance/src/lifecycle.dart
lib/get_navigation/src/extension_navigation.dart
lib/get_navigation/src/root/get_cupertino_app.dart
lib/get_navigation/src/root/root_controller.dart
test/navigation/get_main_test.dart
example/lib/pages/home/domain/entity/cases_model.dart
View file @
8555848
...
...
@@ -6,14 +6,12 @@ import 'dart:convert';
class
CasesModel
{
CasesModel
({
required
this
.
id
,
required
this
.
message
,
required
this
.
global
,
required
this
.
countries
,
required
this
.
date
,
});
final
String
id
;
final
String
message
;
final
Global
global
;
final
List
<
Country
>
countries
;
...
...
@@ -25,7 +23,6 @@ class CasesModel {
String
toRawJson
()
=>
json
.
encode
(
toJson
());
factory
CasesModel
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
=>
CasesModel
(
id:
json
[
"ID"
]
as
String
,
message:
json
[
"Message"
]
as
String
,
global:
Global
.
fromJson
(
json
[
"Global"
]
as
Map
<
String
,
dynamic
>),
countries:
List
<
Country
>.
from
((
json
[
"Countries"
]
as
Iterable
).
map
(
...
...
@@ -35,7 +32,6 @@ class CasesModel {
);
Map
<
String
,
dynamic
>
toJson
()
=>
{
"ID"
:
id
,
"Message"
:
message
,
"Global"
:
global
.
toJson
(),
"Countries"
:
List
<
dynamic
>.
from
(
countries
.
map
((
x
)
=>
x
.
toJson
())),
...
...
example/test/main_test.dart
View file @
8555848
...
...
@@ -25,7 +25,6 @@ class MockRepositorySuccess implements IHomeRepository {
totalRecovered:
0
),
countries:
[],
date:
DateTime
.
now
(),
id:
''
,
message:
''
,
);
}
...
...
example_nav2/ios/Flutter/AppFrameworkInfo.plist
View file @
8555848
...
...
@@ -21,6 +21,6 @@
<key>
CFBundleVersion
</key>
<string>
1.0
</string>
<key>
MinimumOSVersion
</key>
<string>
9
.0
</string>
<string>
11
.0
</string>
</dict>
</plist>
...
...
example_nav2/ios/Flutter/Generated.xcconfig
View file @
8555848
...
...
@@ -7,6 +7,7 @@ FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
EXCLUDED_ARCHS[sdk=iphoneos*]=armv7
DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
...
...
example_nav2/ios/Runner.xcodeproj/project.pbxproj
View file @
8555848
...
...
@@ -272,7 +272,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET =
9
.0;
IPHONEOS_DEPLOYMENT_TARGET =
11
.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
...
...
@@ -346,7 +346,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET =
9
.0;
IPHONEOS_DEPLOYMENT_TARGET =
11
.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
...
...
@@ -395,7 +395,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET =
9
.0;
IPHONEOS_DEPLOYMENT_TARGET =
11
.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
...
...
lib/get_connect/http/src/request/request.dart
View file @
8555848
...
...
@@ -13,7 +13,7 @@ class Request<T> {
final
Uri
url
;
final
Decoder
<
T
>?
decoder
;
final
ResponseInterceptor
<
T
>?
responseInterceptor
;
/// The Http Method from this [Request]
...
...
@@ -66,18 +66,17 @@ class Request<T> {
assert
(
maxRedirects
>
0
);
}
return
Request
.
_
(
url:
url
,
method:
method
,
bodyBytes:
bodyBytes
??=
BodyBytesStream
.
fromBytes
(
const
[]),
headers:
Map
.
from
(
headers
),
followRedirects:
followRedirects
,
maxRedirects:
maxRedirects
,
contentLength:
contentLength
,
files:
files
,
persistentConnection:
persistentConnection
,
decoder:
decoder
,
responseInterceptor:
responseInterceptor
);
url:
url
,
method:
method
,
bodyBytes:
bodyBytes
??=
BodyBytesStream
.
fromBytes
(
const
[]),
headers:
Map
.
from
(
headers
),
followRedirects:
followRedirects
,
maxRedirects:
maxRedirects
,
contentLength:
contentLength
,
files:
files
,
persistentConnection:
persistentConnection
,
decoder:
decoder
,
responseInterceptor:
responseInterceptor
);
}
Request
<
T
>
copyWith
({
...
...
@@ -100,24 +99,22 @@ class Request<T> {
}
return
Request
<
T
>.
_
(
url:
url
??
this
.
url
,
method:
method
??
this
.
method
,
bodyBytes:
bodyBytes
??
this
.
bodyBytes
,
headers:
headers
==
null
?
this
.
headers
:
Map
.
from
(
headers
),
followRedirects:
followRedirects
??
this
.
followRedirects
,
maxRedirects:
maxRedirects
??
this
.
maxRedirects
,
contentLength:
contentLength
??
this
.
contentLength
,
files:
files
??
this
.
files
,
persistentConnection:
persistentConnection
??
this
.
persistentConnection
,
decoder:
decoder
??
this
.
decoder
,
responseInterceptor:
responseInterceptor
??
this
.
responseInterceptor
);
url:
url
??
this
.
url
,
method:
method
??
this
.
method
,
bodyBytes:
bodyBytes
??
this
.
bodyBytes
,
headers:
headers
==
null
?
this
.
headers
:
Map
.
from
(
headers
),
followRedirects:
followRedirects
??
this
.
followRedirects
,
maxRedirects:
maxRedirects
??
this
.
maxRedirects
,
contentLength:
contentLength
??
this
.
contentLength
,
files:
files
??
this
.
files
,
persistentConnection:
persistentConnection
??
this
.
persistentConnection
,
decoder:
decoder
??
this
.
decoder
,
responseInterceptor:
responseInterceptor
??
this
.
responseInterceptor
);
}
}
extension
BodyBytesStream
on
Stream
<
List
<
int
>>
{
static
Stream
<
List
<
int
>>
fromBytes
(
List
<
int
>
bytes
)
=>
Stream
.
fromIterable
([
bytes
]);
static
Stream
<
List
<
int
>>
fromBytes
(
List
<
int
>
bytes
)
=>
Stream
.
value
(
bytes
);
Future
<
Uint8List
>
toBytes
()
{
var
completer
=
Completer
<
Uint8List
>();
...
...
lib/get_instance/src/extension_instance.dart
View file @
8555848
...
...
@@ -170,9 +170,13 @@ extension Inst on GetInterface {
final
isInit
=
_singl
[
key
]!.
isInit
;
S
?
i
;
if
(!
isInit
)
{
i
=
_startController
<
S
>(
tag:
name
);
if
(
_singl
[
key
]!.
isSingleton
!)
{
final
isSingleton
=
_singl
[
key
]?.
isSingleton
??
false
;
if
(
isSingleton
)
{
_singl
[
key
]!.
isInit
=
true
;
}
i
=
_startController
<
S
>(
tag:
name
);
if
(
isSingleton
)
{
if
(
Get
.
smartManagement
!=
SmartManagement
.
onlyBuilder
)
{
RouterReportManager
.
instance
.
reportDependencyLinkedToRoute
(
_getKey
(
S
,
name
));
...
...
lib/get_instance/src/lifecycle.dart
View file @
8555848
...
...
@@ -17,9 +17,7 @@ mixin GetLifeCycleMixin {
@protected
@mustCallSuper
void
onInit
()
{
ambiguate
(
Engine
.
instance
)
?.
addPostFrameCallback
((
_
)
=>
onReady
());
ambiguate
(
Engine
.
instance
)?.
addPostFrameCallback
((
_
)
=>
onReady
());
}
/// Called 1 frame after onInit(). It is the perfect place to enter
...
...
lib/get_navigation/src/extension_navigation.dart
View file @
8555848
...
...
@@ -2,10 +2,7 @@ import 'dart:ui' as ui;
import
'package:flutter/material.dart'
;
import
'../../get_core/get_core.dart'
;
import
'../../get_instance/src/bindings_interface.dart'
;
import
'../../get_utils/get_utils.dart'
;
import
'../get_navigation.dart'
;
import
'../../get.dart'
;
import
'dialog/dialog_route.dart'
;
/// It replaces the Flutter Navigator, but needs no context.
...
...
@@ -1259,8 +1256,8 @@ extension GetNavigationExt on GetInterface {
TDelegate
?
delegate
<
TDelegate
extends
RouterDelegate
<
TPage
>,
TPage
>()
=>
_getxController
.
routerDelegate
as
TDelegate
?;
GetMaterialController
get
_getxController
=>
GetMaterialController
.
to
;
static
final
GetMaterialController
_getxController
=
Get
.
find
<
GetMaterialController
>();
}
extension
OverlayExt
on
GetInterface
{
...
...
lib/get_navigation/src/root/get_cupertino_app.dart
View file @
8555848
...
...
@@ -7,6 +7,7 @@ import '../../../get_instance/get_instance.dart';
import
'../../../get_state_manager/get_state_manager.dart'
;
import
'../../../get_utils/get_utils.dart'
;
import
'../../get_navigation.dart'
;
import
'../router_report.dart'
;
class
GetCupertinoApp
extends
StatelessWidget
{
final
GlobalKey
<
NavigatorState
>?
navigatorKey
;
...
...
@@ -62,6 +63,9 @@ class GetCupertinoApp extends StatelessWidget {
final
BackButtonDispatcher
?
backButtonDispatcher
;
final
CupertinoThemeData
?
theme
;
final
bool
useInheritedMediaQuery
;
final
List
<
Bind
>
binds
;
final
ScrollBehavior
?
scrollBehavior
;
GetCupertinoApp
({
Key
?
key
,
this
.
theme
,
...
...
@@ -86,6 +90,8 @@ class GetCupertinoApp extends StatelessWidget {
this
.
onInit
,
this
.
onDispose
,
this
.
locale
,
this
.
binds
=
const
[],
this
.
scrollBehavior
,
this
.
fallbackLocale
,
this
.
localizationsDelegates
,
this
.
localeListResolutionCallback
,
...
...
@@ -156,6 +162,8 @@ class GetCupertinoApp extends StatelessWidget {
this
.
showSemanticsDebugger
=
false
,
this
.
debugShowCheckedModeBanner
=
true
,
this
.
shortcuts
,
this
.
binds
=
const
[],
this
.
scrollBehavior
,
this
.
actions
,
this
.
customTransition
,
this
.
translationsKeys
,
...
...
@@ -188,125 +196,87 @@ class GetCupertinoApp extends StatelessWidget {
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
=>
GetBuilder
<
GetMaterialController
>(
init:
Get
.
rootController
,
dispose:
(
d
)
{
onDispose
?.
call
();
// Get.clearRouteTree();
// Get.clearTranslations();
// Get.resetRootNavigator();
// Get.routerDelegate = null;
// Get.routeInformationParser = null;
},
initState:
(
i
)
{
Get
.
engine
.
addPostFrameCallback
((
timeStamp
)
{
onReady
?.
call
();
});
if
(
locale
!=
null
)
Get
.
locale
=
locale
;
if
(
fallbackLocale
!=
null
)
Get
.
fallbackLocale
=
fallbackLocale
;
if
(
translations
!=
null
)
{
Get
.
addTranslations
(
translations
!.
keys
);
}
else
if
(
translationsKeys
!=
null
)
{
Get
.
addTranslations
(
translationsKeys
!);
}
// Get.customTransition = customTransition;
initialBinding
?.
dependencies
();
// if (getPages != null) {
// Get.addPages(getPages!);
// } else {
// Get.addPage(
// GetPage(
// name: _cleanRouteName("/${home.runtimeType}"),
// page: () => home!,
// ),
// );
// }
Get
.
smartManagement
=
smartManagement
;
onInit
?.
call
();
Get
.
config
(
enableLog:
enableLog
??
Get
.
isLogEnable
,
logWriterCallback:
logWriterCallback
,
defaultTransition:
defaultTransition
??
Get
.
defaultTransition
,
defaultOpaqueRoute:
opaqueRoute
??
Get
.
isOpaqueRouteDefault
,
defaultPopGesture:
popGesture
??
Get
.
isPopGestureEnable
,
defaultDurationTransition:
transitionDuration
??
Get
.
defaultTransitionDuration
,
);
},
builder:
(
_
)
{
final
routerDelegate
=
_
.
createDelegate
(
pages:
getPages
??
[],
notFoundRoute:
unknownRoute
,
Widget
build
(
BuildContext
context
)
{
return
Binds
(
binds:
[
Bind
.
lazyPut
<
GetMaterialController
>(
()
=>
GetMaterialController
(
ConfigData
(
backButtonDispatcher:
backButtonDispatcher
,
binds:
binds
,
customTransition:
customTransition
,
defaultGlobalState:
defaultGlobalState
,
defaultTransition:
defaultTransition
,
enableLog:
enableLog
,
fallbackLocale:
fallbackLocale
,
getPages:
getPages
,
home:
home
,
initialRoute:
initialRoute
,
locale:
locale
,
logWriterCallback:
logWriterCallback
,
navigatorKey:
navigatorKey
,
navigatorObservers:
(
navigatorObservers
==
null
?
<
NavigatorObserver
>[
GetObserver
(
routingCallback
,
Get
.
routing
)
]
:
<
NavigatorObserver
>[
GetObserver
(
routingCallback
,
Get
.
routing
)
]
..
addAll
(
navigatorObservers
!)));
final
routeInformationParser
=
_
.
createInformationParser
(
initialRoute:
initialRoute
??
getPages
?.
first
.
name
??
_cleanRouteName
(
"/
${home.runtimeType}
"
),
);
return
CupertinoApp
.
router
(
routerDelegate:
routerDelegate
,
routeInformationParser:
routeInformationParser
,
backButtonDispatcher:
backButtonDispatcher
,
routeInformationProvider:
routeInformationProvider
,
key:
_
.
unikey
,
theme:
theme
,
builder:
defaultBuilder
,
title:
title
,
onGenerateTitle:
onGenerateTitle
,
color:
color
,
locale:
Get
.
locale
??
locale
,
localizationsDelegates:
localizationsDelegates
,
localeListResolutionCallback:
localeListResolutionCallback
,
localeResolutionCallback:
localeResolutionCallback
,
supportedLocales:
supportedLocales
,
showPerformanceOverlay:
showPerformanceOverlay
,
checkerboardRasterCacheImages:
checkerboardRasterCacheImages
,
checkerboardOffscreenLayers:
checkerboardOffscreenLayers
,
showSemanticsDebugger:
showSemanticsDebugger
,
debugShowCheckedModeBanner:
debugShowCheckedModeBanner
,
shortcuts:
shortcuts
,
useInheritedMediaQuery:
useInheritedMediaQuery
,
);
},
);
Widget
defaultBuilder
(
BuildContext
context
,
Widget
?
child
)
{
return
Directionality
(
textDirection:
textDirection
??
(
rtlLanguages
.
contains
(
Get
.
locale
?.
languageCode
)
?
TextDirection
.
rtl
:
TextDirection
.
ltr
),
child:
builder
==
null
?
(
child
??
Material
())
:
builder
!(
context
,
child
??
Material
()),
navigatorObservers:
navigatorObservers
,
onDispose:
onDispose
,
onInit:
onInit
,
onReady:
onReady
,
opaqueRoute:
opaqueRoute
,
popGesture:
popGesture
,
routeInformationParser:
routeInformationParser
,
routeInformationProvider:
routeInformationProvider
,
routerDelegate:
routerDelegate
,
routingCallback:
routingCallback
,
scaffoldMessengerKey:
GlobalKey
<
ScaffoldMessengerState
>(),
smartManagement:
smartManagement
,
transitionDuration:
transitionDuration
,
translations:
translations
,
translationsKeys:
translationsKeys
,
unknownRoute:
unknownRoute
,
),
),
onClose:
()
{
Get
.
clearTranslations
();
RouterReportManager
.
dispose
();
Get
.
resetInstance
(
clearRouteBindings:
true
);
},
),
...
binds
,
],
child:
Builder
(
builder:
(
context
)
{
final
controller
=
context
.
listen
<
GetMaterialController
>();
return
CupertinoApp
.
router
(
routerDelegate:
controller
.
routerDelegate
,
routeInformationParser:
controller
.
routeInformationParser
,
backButtonDispatcher:
backButtonDispatcher
,
routeInformationProvider:
routeInformationProvider
,
key:
controller
.
unikey
,
builder:
(
context
,
child
)
=>
Directionality
(
textDirection:
textDirection
??
(
rtlLanguages
.
contains
(
Get
.
locale
?.
languageCode
)
?
TextDirection
.
rtl
:
TextDirection
.
ltr
),
child:
builder
==
null
?
(
child
??
Material
())
:
builder
!(
context
,
child
??
Material
()),
),
title:
title
,
onGenerateTitle:
onGenerateTitle
,
color:
color
,
theme:
theme
,
locale:
Get
.
locale
??
locale
,
localizationsDelegates:
localizationsDelegates
,
localeListResolutionCallback:
localeListResolutionCallback
,
localeResolutionCallback:
localeResolutionCallback
,
supportedLocales:
supportedLocales
,
showPerformanceOverlay:
showPerformanceOverlay
,
checkerboardRasterCacheImages:
checkerboardRasterCacheImages
,
checkerboardOffscreenLayers:
checkerboardOffscreenLayers
,
showSemanticsDebugger:
showSemanticsDebugger
,
debugShowCheckedModeBanner:
debugShowCheckedModeBanner
,
shortcuts:
shortcuts
,
scrollBehavior:
scrollBehavior
,
useInheritedMediaQuery:
useInheritedMediaQuery
,
);
}),
);
}
// Route<dynamic> generator(RouteSettings settings) {
// return PageRedirect(settings: settings, unknownRoute: unknownRoute).page();
// }
// List<Route<dynamic>> initialRoutesGenerate(String name) {
// return [
// PageRedirect(
// settings: RouteSettings(name: name),
// unknownRoute: unknownRoute,
// ).page()
// ];
// }
}
...
...
lib/get_navigation/src/root/root_controller.dart
View file @
8555848
...
...
@@ -70,10 +70,6 @@ class ConfigData {
class
GetMaterialController
extends
FullLifeCycleController
{
GetMaterialController
(
this
.
config
);
static
GetMaterialController
get
to
{
return
Get
.
find
();
}
late
final
RouterDelegate
<
Object
>
routerDelegate
;
late
final
RouteInformationParser
<
Object
>
routeInformationParser
;
final
ConfigData
config
;
...
...
@@ -91,7 +87,7 @@ class GetMaterialController extends FullLifeCycleController {
if
(
config
.
getPages
==
null
&&
config
.
home
==
null
)
{
throw
'You need add pages or home'
;
}
print
(
'route delefate from onInit'
);
routerDelegate
=
config
.
routerDelegate
??
createDelegate
(
pages:
config
.
getPages
??
...
...
@@ -104,13 +100,20 @@ 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
;
...
...
@@ -127,7 +130,6 @@ class GetMaterialController extends FullLifeCycleController {
customTransition
=
config
.
customTransition
;
//Get.setDefaultDelegate(routerDelegate);
Get
.
smartManagement
=
config
.
smartManagement
;
config
.
onInit
?.
call
();
...
...
@@ -136,16 +138,14 @@ class GetMaterialController extends FullLifeCycleController {
defaultTransition
=
config
.
defaultTransition
??
getThemeTransition
();
defaultOpaqueRoute
=
config
.
opaqueRoute
??
true
;
defaultPopGesture
=
config
.
popGesture
??
GetPlatform
.
isIOS
;
defaultTransitionDuration
=
config
.
transitionDuration
??
Duration
(
milliseconds:
300
);
// defaultTransitionCurve = Curves.easeOutQuad;
// defaultDialogTransitionCurve = Curves.easeOutQuad;
// defaultDialogTransitionDuration = Duration(milliseconds: 300);
defaultTransitionDuration
=
config
.
transitionDuration
??
Duration
(
milliseconds:
300
);
}
getThemeTransition
()
{
Transition
?
getThemeTransition
()
{
final
platform
=
Get
.
theme
.
platform
;
final
matchingTransition
=
Get
.
theme
.
pageTransitionsTheme
.
builders
[
platform
];
final
matchingTransition
=
Get
.
theme
.
pageTransitionsTheme
.
builders
[
platform
];
switch
(
matchingTransition
)
{
case
CupertinoPageTransitionsBuilder
():
return
Transition
.
cupertino
;
...
...
@@ -257,15 +257,14 @@ class GetMaterialController extends FullLifeCycleController {
);
}
// static GetDelegate? _delegate;
GetDelegate
createDelegate
({
GetPage
<
dynamic
>?
notFoundRoute
,
List
<
GetPage
>
pages
=
const
[],
List
<
NavigatorObserver
>?
navigatorObservers
,
TransitionDelegate
<
dynamic
>?
transitionDelegate
,
PopMode
backButtonPopMode
=
PopMode
.
history
,
PreventDuplicateHandlingMode
preventDuplicateHandlingMode
=
PreventDuplicateHandlingMode
.
reorderRoutes
,
PreventDuplicateHandlingMode
preventDuplicateHandlingMode
=
PreventDuplicateHandlingMode
.
reorderRoutes
,
GlobalKey
<
NavigatorState
>?
navigatorKey
,
})
{
return
GetDelegate
(
...
...
test/navigation/get_main_test.dart
View file @
8555848
...
...
@@ -47,8 +47,7 @@ void main() {
await
tester
.
pumpAndSettle
();
expect
(
GetMaterialController
.
to
.
rootDelegate
.
currentConfiguration
?.
route
?.
name
,
expect
(
Get
.
rootController
.
rootDelegate
.
currentConfiguration
?.
route
?.
name
,
'/404'
);
});
...
...
Please
register
or
login
to post a comment