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
Jonatas
2020-10-09 12:05:53 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
85700051f39717d123d92a84aaae6aae6ff87f5c
85700051
1 parent
5be58775
improve testMode
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
14 deletions
getx/CHANGELOG.md
packages/get_navigation/lib/src/extension_navigation.dart
getx/CHANGELOG.md
View file @
8570005
## [3.12.2]
-
Fix typos on code and docs (@wbemanuel and @Goddchen)
-
Improve: typedef to GetBuilder and Getx widgets
-
Improve behaviour of null route on lastest flutter version (@FiercestT)
-
Fix onReady called twice on smartManagement.onlyBuilders
-
Fix onClose called twice when GetBuilder is used
-
Fix default customTransitions, and defaultDuration be ignored on unnamedRoutes
-
Transition.native use default Flutter transitions
-
Added Get.testMode to use contextless elements on unit tests
-
Added Get.appUpdate and improve Get.forceAppUpdate
-
## [3.12.1]
-
Remove spaces whitespaces from dart files
...
...
packages/get_navigation/lib/src/extension_navigation.dart
View file @
8570005
...
...
@@ -945,13 +945,27 @@ extension GetNavigation on GetInterface {
}
GlobalKey
<
NavigatorState
>
global
(
int
k
)
{
GlobalKey
<
NavigatorState
>
_key
;
if
(
k
==
null
)
{
return
key
;
_key
=
key
;
}
if
(!
keys
.
containsKey
(
k
))
{
throw
'Route id (
$k
) not found'
;
}
else
{
_key
=
keys
[
k
];
}
if
(
_key
.
currentContext
==
null
)
{
throw
"""You are trying to use contextless navigation without
a GetMaterialApp or Get.key.
If you are testing your app, you can use:
[Get.testMode = true], or if you are running your app on
a physical device or emulator, you must exchange your [MaterialApp]
for a [GetMaterialApp].
"""
;
}
return
keys
[
k
];
return
_key
;
}
@Deprecated
(
'''
...
...
@@ -993,9 +1007,6 @@ Since version 2.8 it is possible to access the properties
/// give access to current Overlay Context
BuildContext
get
overlayContext
=>
key
?.
currentState
?.
overlay
?.
context
;
/// give access to current Overlay Context
BuildContext
get
overlayState
=>
key
?.
currentState
?.
overlay
?.
context
;
/// give access to Theme.of(context)
ThemeData
get
theme
{
ThemeData
_theme
;
...
...
@@ -1032,15 +1043,7 @@ Since version 2.8 it is possible to access the properties
GlobalKey
<
NavigatorState
>
get
key
{
final
_key
=
getxController
?.
key
;
if
(
_key
?.
currentState
==
null
&&
!
testMode
)
{
throw
"""You are trying to use contextless navigation without
a GetMaterialApp or Get.key.
If you are testing your app, you can use:
[Get.testMode = true], or if you are running your app on
a physical device or emulator, you must exchange your [MaterialApp]
for a [GetMaterialApp].
"""
;
}
return
_key
;
}
...
...
Please
register
or
login
to post a comment