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 Fwela
2021-07-22 01:24:54 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
341c6ec2840643ccca0fba76e9c586e1273f919a
341c6ec2
1 parent
1ba50cfb
swapped fromRoute and default constructor
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
example_nav2/lib/app/modules/home/views/home_view.dart
example_nav2/lib/app/modules/root/views/root_view.dart
lib/get_navigation/src/nav2/router_outlet.dart
example_nav2/lib/app/modules/home/views/home_view.dart
View file @
341c6ec
...
...
@@ -19,7 +19,7 @@ class HomeView extends GetView<HomeController> {
currentIndex
=
1
;
}
return
Scaffold
(
body:
GetRouterOutlet
.
fromRoute
(
body:
GetRouterOutlet
(
initialRoute:
Routes
.
DASHBOARD
,
anchorRoute:
Routes
.
HOME
,
key:
Get
.
nestedKey
(
Routes
.
HOME
),
...
...
example_nav2/lib/app/modules/root/views/root_view.dart
View file @
341c6ec
...
...
@@ -17,7 +17,7 @@ class RootView extends GetView<RootController> {
title:
Text
(
title
??
''
),
centerTitle:
true
,
),
body:
GetRouterOutlet
.
fromRoute
(
body:
GetRouterOutlet
(
initialRoute:
Routes
.
HOME
,
anchorRoute:
'/'
,
filterPages:
(
afterAnchor
)
{
...
...
lib/get_navigation/src/nav2/router_outlet.dart
View file @
341c6ec
...
...
@@ -76,12 +76,12 @@ class _RouterOutletState<TDelegate extends RouterDelegate<T>, T extends Object>
}
class
GetRouterOutlet
extends
RouterOutlet
<
GetDelegate
,
GetNavConfig
>
{
GetRouterOutlet
.
fromRoute
({
GetRouterOutlet
({
required
String
anchorRoute
,
required
String
initialRoute
,
Iterable
<
GetPage
>
Function
(
Iterable
<
GetPage
>
afterAnchor
)?
filterPages
,
GlobalKey
<
NavigatorState
>?
key
,
})
:
this
(
})
:
this
.
pickPages
(
pickPages:
(
config
)
{
var
ret
=
config
.
currentTreeBranch
.
pickAfterRoute
(
anchorRoute
);
if
(
filterPages
!=
null
)
{
...
...
@@ -94,7 +94,7 @@ class GetRouterOutlet extends RouterOutlet<GetDelegate, GetNavConfig> {
delegate
.
notFoundRoute
,
key:
key
,
);
GetRouterOutlet
({
GetRouterOutlet
.
pickPages
({
Widget
Function
(
GetDelegate
delegate
)?
emptyWidget
,
GetPage
Function
(
GetDelegate
delegate
)?
emptyPage
,
required
Iterable
<
GetPage
>
Function
(
GetNavConfig
currentNavStack
)
pickPages
,
...
...
Please
register
or
login
to post a comment