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
1
Merge Requests
1
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
15d14148
Commit
15d14148
authored
Mar 11, 2020
by
Jim
Committed by
GitHub
Mar 11, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #622 from sundayman/master
解决iOS hot restart 白屏
parents
d8d8529e
73ccc45c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
17 deletions
+27
-17
ios/Classes/container/FLBFlutterViewContainer.m
ios/Classes/container/FLBFlutterViewContainer.m
+4
-5
lib/flutter_boost.dart
lib/flutter_boost.dart
+23
-12
No files found.
ios/Classes/container/FLBFlutterViewContainer.m
View file @
15d14148
...
...
@@ -179,11 +179,10 @@ static NSUInteger kInstanceCounter = 0;
params:
_params
uniqueId:
self
.
uniqueIDString
];
//Save some first time page info.
if
(
!
[
FlutterBoostPlugin
sharedInstance
].
fPagename
){
[
FlutterBoostPlugin
sharedInstance
].
fPagename
=
_name
;
[
FlutterBoostPlugin
sharedInstance
].
fPageId
=
self
.
uniqueIDString
;
[
FlutterBoostPlugin
sharedInstance
].
fParams
=
_params
;
}
[
FlutterBoostPlugin
sharedInstance
].
fPagename
=
_name
;
[
FlutterBoostPlugin
sharedInstance
].
fPageId
=
self
.
uniqueIDString
;
[
FlutterBoostPlugin
sharedInstance
].
fParams
=
_params
;
[
super
viewWillAppear
:
animated
];
[
self
.
view
setNeedsLayout
];
...
...
lib/flutter_boost.dart
View file @
15d14148
...
...
@@ -55,23 +55,34 @@ class FlutterBoost {
static
ContainerManagerState
get
containerManager
=>
_instance
.
containerManagerKey
.
currentState
;
static
void
onPageStart
()
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
singleton
.
channel
.
invokeMethod
<
Map
>(
'pageOnStart'
).
then
((
Map
pageInfo
)
{
if
(
pageInfo
==
null
||
pageInfo
.
isEmpty
)
return
;
if
(
pageInfo
.
containsKey
(
"name"
)
&&
pageInfo
.
containsKey
(
"params"
)
&&
pageInfo
.
containsKey
(
"uniqueId"
))
{
ContainerCoordinator
.
singleton
.
nativeContainerDidShow
(
pageInfo
[
"name"
],
pageInfo
[
"params"
],
pageInfo
[
"uniqueId"
]);
}
});
});
}
static
TransitionBuilder
init
(
{
TransitionBuilder
builder
,
PrePushRoute
prePush
,
PostPushRoute
postPush
})
{
if
(
Platform
.
isAndroid
)
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
singleton
.
channel
.
invokeMethod
<
Map
>(
'pageOnStart'
).
then
((
Map
pageInfo
)
{
if
(
pageInfo
==
null
||
pageInfo
.
isEmpty
)
return
;
if
(
pageInfo
.
containsKey
(
"name"
)
&&
pageInfo
.
containsKey
(
"params"
)
&&
pageInfo
.
containsKey
(
"uniqueId"
))
{
ContainerCoordinator
.
singleton
.
nativeContainerDidShow
(
pageInfo
[
"name"
],
pageInfo
[
"params"
],
pageInfo
[
"uniqueId"
]);
}
});
});
onPageStart
();
}
else
if
(
Platform
.
isIOS
)
{
assert
(()
{
()
async
{
onPageStart
();
}();
return
true
;
}());
}
return
(
BuildContext
context
,
Widget
child
)
{
...
...
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