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
26ad1df9
Commit
26ad1df9
authored
Mar 21, 2020
by
余玠
Committed by
Luke
Mar 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cherry pick fix from v1.12.13-hotfixes: 解决bug:
https://github.com/flutter/flutter/issues/52455
parent
91388853
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
29 deletions
+25
-29
ios/Classes/Engine/FLBFlutterEngine.m
ios/Classes/Engine/FLBFlutterEngine.m
+4
-4
ios/Classes/container/FLBFlutterViewContainer.m
ios/Classes/container/FLBFlutterViewContainer.m
+21
-25
No files found.
ios/Classes/Engine/FLBFlutterEngine.m
View file @
26ad1df9
...
@@ -53,10 +53,10 @@
...
@@ -53,10 +53,10 @@
}
else
{
}
else
{
[
_engine
runWithEntrypoint
:
nil
];
[
_engine
runWithEntrypoint
:
nil
];
}
}
_dummy
=
[[
FLBFlutterViewContainer
alloc
]
initWithEngine
:
_engine
//
_dummy = [[FLBFlutterViewContainer alloc] initWithEngine:_engine
nibName:
nil
//
nibName:nil
bundle:
nil
];
//
bundle:nil];
_dummy
.
name
=
kIgnoreMessageWithName
;
//
_dummy.name = kIgnoreMessageWithName;
}
}
return
self
;
return
self
;
...
...
ios/Classes/container/FLBFlutterViewContainer.m
View file @
26ad1df9
...
@@ -34,6 +34,22 @@
...
@@ -34,6 +34,22 @@
#define FLUTTER_VIEW FLUTTER_APP.flutterViewController.view
#define FLUTTER_VIEW FLUTTER_APP.flutterViewController.view
#define FLUTTER_VC FLUTTER_APP.flutterViewController
#define FLUTTER_VC FLUTTER_APP.flutterViewController
@interface
FlutterViewController
(
bridgeToviewDidDisappear
)
-
(
void
)
flushOngoingTouches
;
-
(
void
)
override_viewDidDisappear
:(
BOOL
)
animated
;
@end
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wincomplete-implementation"
@implementation
FlutterViewController
(
bridgeToviewDidDisappear
)
-
(
void
)
bridge_viewDidDisappear
:(
BOOL
)
animated
{
// TRACE_EVENT0("flutter", "viewDidDisappear");
[
self
flushOngoingTouches
];
[
super
viewDidDisappear
:
animated
];
}
@end
@interface
FLBFlutterViewContainer
()
@interface
FLBFlutterViewContainer
()
@property
(
nonatomic
,
strong
,
readwrite
)
NSDictionary
*
params
;
@property
(
nonatomic
,
strong
,
readwrite
)
NSDictionary
*
params
;
@property
(
nonatomic
,
assign
)
long
long
identifier
;
@property
(
nonatomic
,
assign
)
long
long
identifier
;
...
@@ -184,17 +200,9 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -184,17 +200,9 @@ static NSUInteger kInstanceCounter = 0;
[
FlutterBoostPlugin
sharedInstance
].
fParams
=
_params
;
[
FlutterBoostPlugin
sharedInstance
].
fParams
=
_params
;
[
self
attatchFlutterEngine
];
[
super
viewWillAppear
:
animated
];
[
super
viewWillAppear
:
animated
];
[
self
.
view
setNeedsLayout
];
[
self
.
view
setNeedsLayout
];
//TODO:通过param来设定
[
self
surfaceUpdated
:
YES
];
//instead of calling [super viewWillAppear:animated];, call super's super
// struct objc_super target = {
// .super_class = class_getSuperclass([FlutterViewController class]),
// .receiver = self,
// };
// NSMethodSignature * (*callSuper)(struct objc_super *, SEL, BOOL animated) = (__typeof__(callSuper))objc_msgSendSuper;
// callSuper(&target, @selector(viewWillAppear:), animated);
}
}
-
(
void
)
viewDidAppear
:(
BOOL
)
animated
-
(
void
)
viewDidAppear
:(
BOOL
)
animated
...
@@ -209,9 +217,6 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -209,9 +217,6 @@ static NSUInteger kInstanceCounter = 0;
params:
_params
params:
_params
uniqueId:
self
.
uniqueIDString
];
uniqueId:
self
.
uniqueIDString
];
//NOTES:务必在show之后再update,否则有闪烁
[
self
surfaceUpdated
:
YES
];
[
super
viewDidAppear
:
animated
];
[
super
viewDidAppear
:
animated
];
}
}
...
@@ -239,24 +244,15 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -239,24 +244,15 @@ static NSUInteger kInstanceCounter = 0;
pageName:
_name
pageName:
_name
params:
_params
params:
_params
uniqueId:
self
.
uniqueIDString
];
uniqueId:
self
.
uniqueIDString
];
[
super
viewDidDisappear
:
animated
];
//NOTES:因为UIViewController在present view后dismiss其页面的view disappear会发生在下一个页面view appear之后,导致当前engine持有的VC被surfaceUpdate(NO),从而销毁底层的raster。此处是考虑到这种情形,重建surface
//NOTES:因为UIViewController在present view后dismiss其页面的view disappear会发生在下一个页面view appear之后,导致当前engine持有的VC被surfaceUpdate(NO),从而销毁底层的raster。此处是考虑到这种情形,重建surface
if
(
FLUTTER_VC
.
beingPresented
||
self
.
beingDismissed
||
!
[
self
.
uniqueIDString
isEqualToString
:[(
FLBFlutterViewContainer
*
)
FLUTTER_VC
uniqueIDString
]]
)
if
(
FLUTTER_VC
.
beingPresented
||
self
.
beingDismissed
/*|| ![self.uniqueIDString isEqualToString:[(FLBFlutterViewContainer*)FLUTTER_VC uniqueIDString]]*/
)
{
{
[
FLUTTER_APP
resume
];
[
FLUTTER_APP
resume
];
[(
FLBFlutterViewContainer
*
)
FLUTTER_VC
surfaceUpdated
:
YES
];
[(
FLBFlutterViewContainer
*
)
FLUTTER_VC
surfaceUpdated
:
YES
];
}
}
// instead of calling [super viewDidDisappear:animated];, call super's super
[
self
bridge_viewDidDisappear
:
animated
];
// struct objc_super target = {
// .super_class = class_getSuperclass([FlutterViewController class]),
// .receiver = self,
// };
// NSMethodSignature * (*callSuper)(struct objc_super *, SEL, BOOL animated) = (__typeof__(callSuper))objc_msgSendSuper;
// callSuper(&target, @selector(viewDidDisappear:), animated);
[
self
detatchFlutterEngine
];
}
}
-
(
void
)
installSplashScreenViewIfNecessary
{
-
(
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