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
aef7e019
Commit
aef7e019
authored
Mar 31, 2020
by
余玠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
尝试支持present非fUIModalPresentationFullScreen样式的VC,但会闪烁
parent
ac1f354d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
9 deletions
+15
-9
example/ios/Runner/NativeViewController.m
example/ios/Runner/NativeViewController.m
+1
-0
ios/Classes/Boost/FLBFlutterApplicationInterface.h
ios/Classes/Boost/FLBFlutterApplicationInterface.h
+1
-0
ios/Classes/Boost/FLBFlutterProvider.h
ios/Classes/Boost/FLBFlutterProvider.h
+1
-1
ios/Classes/Engine/FLBFlutterApplication.m
ios/Classes/Engine/FLBFlutterApplication.m
+9
-1
ios/Classes/Engine/FLBFlutterEngine.m
ios/Classes/Engine/FLBFlutterEngine.m
+3
-2
ios/Classes/container/FLBFlutterViewContainer.m
ios/Classes/container/FLBFlutterViewContainer.m
+0
-5
No files found.
example/ios/Runner/NativeViewController.m
View file @
aef7e019
...
@@ -52,6 +52,7 @@
...
@@ -52,6 +52,7 @@
// [self.flutterContainer.view layoutIfNeeded];
// [self.flutterContainer.view layoutIfNeeded];
}
}
//NOTES: embed情景下必须实现!!!
-
(
void
)
didMoveToParentViewController
:(
UIViewController
*
)
parent
{
-
(
void
)
didMoveToParentViewController
:(
UIViewController
*
)
parent
{
[
self
.
flutterContainer
didMoveToParentViewController
:
parent
];
[
self
.
flutterContainer
didMoveToParentViewController
:
parent
];
[
super
didMoveToParentViewController
:
parent
];
[
super
didMoveToParentViewController
:
parent
];
...
...
ios/Classes/Boost/FLBFlutterApplicationInterface.h
View file @
aef7e019
...
@@ -66,6 +66,7 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -66,6 +66,7 @@ NS_ASSUME_NONNULL_BEGIN
onPageFinished
:(
void
(
^
)(
NSDictionary
*
))
resultCallback
onPageFinished
:(
void
(
^
)(
NSDictionary
*
))
resultCallback
completion
:(
void
(
^
)(
BOOL
))
completion
;
completion
:(
void
(
^
)(
BOOL
))
completion
;
-
(
void
)
attachToPreviousContainer
;
-
(
void
)
didInitPageContainer
:(
NSString
*
)
url
-
(
void
)
didInitPageContainer
:(
NSString
*
)
url
params
:(
NSDictionary
*
)
urlParams
params
:(
NSDictionary
*
)
urlParams
...
...
ios/Classes/Boost/FLBFlutterProvider.h
View file @
aef7e019
...
@@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
@protocol
FLBFlutterProvider
<
NSObject
>
@protocol
FLBFlutterProvider
<
NSObject
>
@required
@required
-
(
FlutterEngine
*
)
engine
;
-
(
FlutterEngine
*
)
engine
;
-
(
void
)
atacheToViewController
:(
FlutterViewController
*
)
vc
;
-
(
BOOL
)
atacheToViewController
:(
FlutterViewController
*
)
vc
;
-
(
void
)
detach
;
-
(
void
)
detach
;
-
(
void
)
prepareEngineIfNeeded
;
-
(
void
)
prepareEngineIfNeeded
;
-
(
void
)
pause
;
-
(
void
)
pause
;
...
...
ios/Classes/Engine/FLBFlutterApplication.m
View file @
aef7e019
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
@interface
FLBFlutterApplication
()
@interface
FLBFlutterApplication
()
@property
(
nonatomic
,
strong
)
FLBFlutterContainerManager
*
manager
;
@property
(
nonatomic
,
strong
)
FLBFlutterContainerManager
*
manager
;
@property
(
nonatomic
,
strong
)
id
<
FLBFlutterProvider
>
viewProvider
;
@property
(
nonatomic
,
strong
)
id
<
FLBFlutterProvider
>
viewProvider
;
@property
(
nonatomic
,
weak
,
readonly
)
FlutterViewController
*
previousViewController
;
@property
(
nonatomic
,
assign
)
BOOL
isRunning
;
@property
(
nonatomic
,
assign
)
BOOL
isRunning
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
pageResultCallbacks
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
pageResultCallbacks
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
callbackCache
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
callbackCache
;
...
@@ -157,6 +158,13 @@
...
@@ -157,6 +158,13 @@
return
self
.
flutterProvider
.
engine
.
viewController
;
return
self
.
flutterProvider
.
engine
.
viewController
;
}
}
-
(
void
)
attachToPreviousContainer
{
if
([
self
.
viewProvider
atacheToViewController
:
self
.
previousViewController
]){
[
self
.
previousViewController
.
view
setNeedsLayout
];
[(
FLBFlutterViewContainer
*
)
self
.
previousViewController
surfaceUpdated
:
YES
];
}
}
-
(
void
)
close
:(
NSString
*
)
uniqueId
-
(
void
)
close
:(
NSString
*
)
uniqueId
result
:(
NSDictionary
*
)
resultData
result
:(
NSDictionary
*
)
resultData
exts
:(
NSDictionary
*
)
exts
exts
:(
NSDictionary
*
)
exts
...
@@ -190,7 +198,7 @@
...
@@ -190,7 +198,7 @@
[
newParams
setObject
:
cid
?
cid
:
@"__default#0__"
forKey
:
kPageCallBackId
];
[
newParams
setObject
:
cid
?
cid
:
@"__default#0__"
forKey
:
kPageCallBackId
];
urlParams
=
newParams
;
urlParams
=
newParams
;
}
}
_previousViewController
=
[
self
flutterViewController
];
_callbackCache
[
cid
]
=
resultCallback
;
_callbackCache
[
cid
]
=
resultCallback
;
if
([
urlParams
[
@"present"
]
respondsToSelector
:
@selector
(
boolValue
)]
&&
[
urlParams
[
@"present"
]
boolValue
]
&&
[
self
.
platform
respondsToSelector
:
@selector
(
present
:
urlParams
:
exts
:
completion
:
)]){
if
([
urlParams
[
@"present"
]
respondsToSelector
:
@selector
(
boolValue
)]
&&
[
urlParams
[
@"present"
]
boolValue
]
&&
[
self
.
platform
respondsToSelector
:
@selector
(
present
:
urlParams
:
exts
:
completion
:
)]){
[
self
.
platform
present
:
url
[
self
.
platform
present
:
url
...
...
ios/Classes/Engine/FLBFlutterEngine.m
View file @
aef7e019
...
@@ -97,12 +97,13 @@
...
@@ -97,12 +97,13 @@
arguments:
@{
@"type"
:
@"foreground"
}];
arguments:
@{
@"type"
:
@"foreground"
}];
}
}
-
(
void
)
atacheToViewController
:(
FlutterViewController
*
)
vc
-
(
BOOL
)
atacheToViewController
:(
FlutterViewController
*
)
vc
{
{
if
(
_engine
.
viewController
!=
vc
){
if
(
_engine
.
viewController
!=
vc
){
// [(FLBFlutterViewContainer *)_engine.viewController surfaceUpdated:NO];
_engine
.
viewController
=
vc
;
_engine
.
viewController
=
vc
;
return
YES
;
}
}
return
NO
;
}
}
-
(
void
)
detach
-
(
void
)
detach
...
...
ios/Classes/container/FLBFlutterViewContainer.m
View file @
aef7e019
...
@@ -287,11 +287,6 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -287,11 +287,6 @@ static NSUInteger kInstanceCounter = 0;
pageName:
_name
pageName:
_name
params:
_params
params:
_params
uniqueId:
self
.
uniqueIDString
];
uniqueId:
self
.
uniqueIDString
];
// 如果当前不可见vc和engine所持有的vc一致。在FlutterVC在混合栈中是最后一张页面,如tab中的页面
// if (self == FLUTTER_VC)
// {
// [self surfaceUpdated:NO];
// }
[
super
bridge_viewDidDisappear
:
animated
];
[
super
bridge_viewDidDisappear
:
animated
];
}
}
...
...
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