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
db503d96
Commit
db503d96
authored
Jul 17, 2019
by
Jidong Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lifecycle problems.
parent
3582a150
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
ios/Classes/1.5/FLB2FlutterEngine.m
ios/Classes/1.5/FLB2FlutterEngine.m
+5
-2
ios/Classes/1.5/FLB2FlutterViewContainer.m
ios/Classes/1.5/FLB2FlutterViewContainer.m
+8
-6
No files found.
ios/Classes/1.5/FLB2FlutterEngine.m
View file @
db503d96
...
...
@@ -71,12 +71,14 @@
-
(
void
)
pause
{
[[
_engine
lifecycleChannel
]
sendMessage
:
@"AppLifecycleState.pause"
];
[[
_engine
lifecycleChannel
]
sendMessage
:
@"AppLifecycleState.paused"
];
[
self
detach
];
}
-
(
void
)
resume
{
[[
_engine
lifecycleChannel
]
sendMessage
:
@"AppLifecycleState.resume"
];
[[
_engine
lifecycleChannel
]
sendMessage
:
@"AppLifecycleState.resumed"
];
[(
FLB2FlutterViewContainer
*
)
_engine
.
viewController
surfaceUpdated
:
YES
];
}
-
(
void
)
inactive
...
...
@@ -85,6 +87,7 @@
}
-
(
FlutterEngine
*
)
engine
{
return
_engine
;
...
...
ios/Classes/1.5/FLB2FlutterViewContainer.m
View file @
db503d96
...
...
@@ -83,7 +83,7 @@ static NSUInteger kInstanceCounter = 0;
{
kInstanceCounter
++
;
if
(
kInstanceCounter
==
1
){
//
[FLUTTER_APP resume];
[
FLUTTER_APP
resume
];
}
}
...
...
@@ -91,7 +91,7 @@ static NSUInteger kInstanceCounter = 0;
{
kInstanceCounter
--
;
if
([
self
.
class
instanceCounter
]
==
0
){
//
[FLUTTER_APP pause];
[
FLUTTER_APP
pause
];
}
}
...
...
@@ -165,7 +165,6 @@ static NSUInteger kInstanceCounter = 0;
[
FLUTTER_APP
resume
];
[
self
surfaceUpdated
:
YES
];
//For new page we should attach flutter view in view will appear
//for better performance.
...
...
@@ -189,7 +188,8 @@ static NSUInteger kInstanceCounter = 0;
//Ensure flutter view is attached.
[
self
attatchFlutterEngine
];
[
self
surfaceUpdated
:
YES
];
[
FLUTTER_APP
resume
];
[
BoostMessageChannel
didShowPageContainer
:
^
(
NSNumber
*
result
)
{}
pageName:
_name
params:
_params
...
...
@@ -210,12 +210,14 @@ static NSUInteger kInstanceCounter = 0;
-
(
void
)
viewDidDisappear
:(
BOOL
)
animated
{
[
self
detatchFlutterEngine
];
[
super
viewDidDisappear
:
animated
];
[
FLUTTER_APP
resume
];
[
BoostMessageChannel
didDisappearPageContainer
:
^
(
NSNumber
*
result
)
{}
pageName:
_name
params:
_params
uniqueId:
self
.
uniqueIDString
];
[
super
viewDidDisappear
:
animated
];
}
-
(
void
)
installSplashScreenViewIfNecessary
{
...
...
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