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
Nicolas Lopez
2020-10-20 14:33:00 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1a16f6ebd0fbb09d7fb92f40f17291a7163eb6fc
1a16f6eb
1 parent
6048106c
Navigation Generic && Arguments
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
lib/get_navigation/src/extension_navigation.dart
lib/get_navigation/src/extension_navigation.dart
View file @
1a16f6e
...
...
@@ -220,7 +220,7 @@ extension ExtensionDialog on GetInterface {
Color
barrierColor
,
bool
useSafeArea
=
true
,
bool
useRootNavigator
=
true
,
RouteSettings
routeSetting
s
,
Object
argument
s
,
Duration
transitionDuration
,
Curve
transitionCurve
,
})
{
...
...
@@ -231,7 +231,7 @@ extension ExtensionDialog on GetInterface {
assert
(
debugCheckHasMaterialLocalizations
(
context
));
final
theme
=
Theme
.
of
(
context
,
shadowThemeOnly:
true
);
return
generalDialog
(
return
generalDialog
<
T
>
(
pageBuilder:
(
buildContext
,
animation
,
secondaryAnimation
)
{
final
pageChild
=
widget
;
Widget
dialog
=
Builder
(
builder:
(
context
)
{
...
...
@@ -258,7 +258,7 @@ extension ExtensionDialog on GetInterface {
);
},
useRootNavigator:
useRootNavigator
,
routeSettings:
routeSettings
,
routeSettings:
RouteSettings
(
arguments:
arguments
)
,
);
}
...
...
@@ -360,7 +360,7 @@ extension ExtensionDialog on GetInterface {
}
}
return
dialog
(
return
dialog
<
T
>
(
AlertDialog
(
titlePadding:
EdgeInsets
.
all
(
8
),
contentPadding:
EdgeInsets
.
all
(
8
),
...
...
@@ -485,7 +485,7 @@ extension GetNavigation on GetInterface {
return
null
;
}
return
global
(
id
)?.
currentState
?.
push
(
GetPageRoute
(
GetPageRoute
<
T
>
(
opaque:
opaque
??
true
,
page:
()
=>
page
,
routeName:
routeName
,
...
...
@@ -528,7 +528,7 @@ extension GetNavigation on GetInterface {
if
(
preventDuplicates
&&
page
==
currentRoute
)
{
return
null
;
}
return
global
(
id
)?.
currentState
?.
pushNamed
(
page
,
arguments:
arguments
);
return
global
(
id
)?.
currentState
?.
pushNamed
<
T
>
(
page
,
arguments:
arguments
);
}
/// **Navigation.pushReplacementNamed()** shortcut.<br><br>
...
...
@@ -601,7 +601,7 @@ extension GetNavigation on GetInterface {
Future
<
T
>
offUntil
<
T
>(
Route
<
T
>
page
,
RoutePredicate
predicate
,
{
int
id
})
{
// if (key.currentState.mounted) // add this if appear problems on future with route navigate
// when widget don't mounted
return
global
(
id
)?.
currentState
?.
pushAndRemoveUntil
(
page
,
predicate
);
return
global
(
id
)?.
currentState
?.
pushAndRemoveUntil
<
T
>
(
page
,
predicate
);
}
/// **Navigation.pushNamedAndRemoveUntil()** shortcut.<br><br>
...
...
@@ -629,7 +629,7 @@ extension GetNavigation on GetInterface {
})
{
return
global
(
id
)
?.
currentState
?.
pushNamedAndRemoveUntil
(
page
,
predicate
,
arguments:
arguments
);
?.
pushNamedAndRemoveUntil
<
T
>
(
page
,
predicate
,
arguments:
arguments
);
}
/// **Navigation.popAndPushNamed()** shortcut.<br><br>
...
...
@@ -717,8 +717,8 @@ extension GetNavigation on GetInterface {
///
/// It has the advantage of not needing context, so you can call
/// from your business logic.
void
back
({
dynamic
result
,
void
back
<
T
>({
T
result
,
bool
closeOverlays
=
false
,
bool
canPop
=
true
,
int
id
,
...
...
@@ -733,7 +733,7 @@ extension GetNavigation on GetInterface {
global
(
id
)?.
currentState
?.
pop
(
result
);
}
}
else
{
global
(
id
)?.
currentState
?.
pop
(
result
);
global
(
id
)?.
currentState
?.
pop
<
T
>
(
result
);
}
}
...
...
@@ -854,7 +854,7 @@ extension GetNavigation on GetInterface {
})
{
var
routeName
=
"/
${page.runtimeType.toString()}
"
;
return
global
(
id
)?.
currentState
?.
pushAndRemoveUntil
(
return
global
(
id
)?.
currentState
?.
pushAndRemoveUntil
<
T
>
(
GetPageRoute
(
opaque:
opaque
??
true
,
popGesture:
popGesture
??
defaultPopGesture
,
...
...
Please
register
or
login
to post a comment