Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flutter_boost_1.22.4
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢冠章
flutter_boost_1.22.4
Commits
6e223c20
Commit
6e223c20
authored
May 18, 2020
by
SpeciedCrab
Committed by
justin
Jun 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 1.17
parent
f7f7d96f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
34 deletions
+54
-34
lib/container/boost_container.dart
lib/container/boost_container.dart
+49
-34
lib/container/boost_page_route.dart
lib/container/boost_page_route.dart
+5
-0
No files found.
lib/container/boost_container.dart
View file @
6e223c20
...
@@ -41,7 +41,7 @@ enum ContainerLifeCycle {
...
@@ -41,7 +41,7 @@ enum ContainerLifeCycle {
typedef
BoostContainerLifeCycleObserver
=
void
Function
(
typedef
BoostContainerLifeCycleObserver
=
void
Function
(
ContainerLifeCycle
state
,
ContainerLifeCycle
state
,
BoostContainerSettings
settings
,
BoostContainerSettings
settings
,
);
);
class
BoostContainer
extends
Navigator
{
class
BoostContainer
extends
Navigator
{
const
BoostContainer
({
const
BoostContainer
({
...
@@ -161,6 +161,15 @@ class BoostContainerState extends NavigatorState {
...
@@ -161,6 +161,15 @@ class BoostContainerState extends NavigatorState {
void
initState
()
{
void
initState
()
{
super
.
initState
();
super
.
initState
();
backPressedHandler
=
()
=>
maybePop
();
backPressedHandler
=
()
=>
maybePop
();
final
String
initRoute
=
widget
.
initialRoute
??
Navigator
.
defaultRouteName
;
if
(
initRoute
!=
null
&&
routerHistory
.
isEmpty
)
{
routerHistory
.
addAll
(
widget
.
onGenerateInitialRoutes
(
this
,
widget
.
initialRoute
??
Navigator
.
defaultRouteName
)
);
}
}
}
@override
@override
...
@@ -177,7 +186,13 @@ class BoostContainerState extends NavigatorState {
...
@@ -177,7 +186,13 @@ class BoostContainerState extends NavigatorState {
@override
@override
Future
<
bool
>
maybePop
<
T
extends
Object
>([
T
result
])
async
{
Future
<
bool
>
maybePop
<
T
extends
Object
>([
T
result
])
async
{
if
(
routerHistory
.
isEmpty
)
{
pop
(
result
);
return
true
;
}
final
Route
<
T
>
route
=
routerHistory
.
last
as
Route
<
T
>;
final
Route
<
T
>
route
=
routerHistory
.
last
as
Route
<
T
>;
final
RoutePopDisposition
disposition
=
await
route
.
willPop
();
final
RoutePopDisposition
disposition
=
await
route
.
willPop
();
if
(
mounted
)
{
if
(
mounted
)
{
switch
(
disposition
)
{
switch
(
disposition
)
{
...
...
lib/container/boost_page_route.dart
View file @
6e223c20
...
@@ -62,4 +62,9 @@ class BoostPageRoute<T> extends MaterialPageRoute<T> {
...
@@ -62,4 +62,9 @@ class BoostPageRoute<T> extends MaterialPageRoute<T> {
return
null
;
return
null
;
}
}
}
}
@override
Future
<
RoutePopDisposition
>
willPop
()
{
return
Future
<
RoutePopDisposition
>.
value
(
RoutePopDisposition
.
pop
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment