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
c2c27908
Commit
c2c27908
authored
Jun 27, 2019
by
Jidong Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some fix
parent
7aa36cef
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
17 deletions
+22
-17
example/ios/Runner/DemoRouter.m
example/ios/Runner/DemoRouter.m
+2
-5
example/ios/Runner/UIViewControllerDemo.m
example/ios/Runner/UIViewControllerDemo.m
+8
-2
example/lib/simple_page_widgets.dart
example/lib/simple_page_widgets.dart
+0
-4
ios/Classes/Boost/FLB2FlutterProvider.h
ios/Classes/Boost/FLB2FlutterProvider.h
+0
-1
ios/Classes/Boost/FlutterBoostPlugin.m
ios/Classes/Boost/FlutterBoostPlugin.m
+12
-5
No files found.
example/ios/Runner/DemoRouter.m
View file @
c2c27908
...
...
@@ -21,7 +21,7 @@
return
instance
;
}
// Boost 2 switch
//
AB
Boost 2 switch
-
(
BOOL
)
useBoost2
{
return
YES
;
...
...
@@ -57,7 +57,7 @@
BOOL
animated
=
[
exts
[
@"animated"
]
boolValue
];
animated
=
YES
;
FLBFlutterViewContainer
*
vc
=
(
id
)
self
.
navigationController
.
presentedViewController
;
if
([
vc
isKindOfClass
:
FLBFlutterViewContainer
.
class
]
&&
[
vc
.
uniqueIDString
isEqual
:
uid
]){
if
([
vc
isKindOfClass
:
FLB
2
FlutterViewContainer
.
class
]
&&
[
vc
.
uniqueIDString
isEqual
:
uid
]){
[
vc
dismissViewControllerAnimated
:
animated
completion
:
^
{}];
}
else
{
[
self
.
navigationController
popViewControllerAnimated
:
animated
];
...
...
@@ -93,9 +93,6 @@
}
}
-
(
void
)
closePage
:(
NSString
*
)
uid
animated
:(
BOOL
)
animated
params
:(
NSDictionary
*
)
params
completion
:(
void
(
^
)(
BOOL
))
completion
{
if
([
self
useBoost2
]){
...
...
example/ios/Runner/UIViewControllerDemo.m
View file @
c2c27908
...
...
@@ -25,13 +25,19 @@
-
(
IBAction
)
pushFlutterPage
:(
id
)
sender
{
[
DemoRouter
.
sharedRouter
openPage
:
@"first"
params
:@{}
animated
:
YES
completion
:^
(
BOOL
f
){
[
DemoRouter
.
sharedRouter
openPage
:
@"first"
params:
@{}
animated:
YES
completion:
^
(
BOOL
f
){
}];
}
-
(
IBAction
)
present
:(
id
)
sender
{
[
DemoRouter
.
sharedRouter
openPage
:
@"second"
params
:@{
@"present"
:
@
(
YES
)}
animated
:
YES
completion
:^
(
BOOL
f
){}];
[
DemoRouter
.
sharedRouter
openPage
:
@"second"
params:
@{
@"present"
:
@
(
YES
)}
animated:
YES
completion:
^
(
BOOL
f
){}];
// [self dismissViewControllerAnimated:YES completion:completion];
}
...
...
example/lib/simple_page_widgets.dart
View file @
c2c27908
...
...
@@ -39,10 +39,6 @@ class SecondRouteWidget extends StatelessWidget {
// Navigate back to first route when tapped.
BoostContainerSettings
settings
=
BoostContainer
.
of
(
context
).
settings
;
if
(
settings
.
params
.
containsKey
(
"result_id"
)){
String
rid
=
settings
.
params
[
"result_id"
];
}
FlutterBoost
.
singleton
.
close
(
settings
.
uniqueId
,
result:
{
"result"
:
"data from second"
});
},
child:
Text
(
'Go back with result!'
),
...
...
ios/Classes/Boost/FLB2FlutterProvider.h
View file @
c2c27908
...
...
@@ -30,7 +30,6 @@
NS_ASSUME_NONNULL_BEGIN
#define RELEASE_1_0 1
@protocol
FLB2FlutterProvider
<
FLBFlutterViewProvider
>
...
...
ios/Classes/Boost/FlutterBoostPlugin.m
View file @
c2c27908
...
...
@@ -29,6 +29,8 @@
#import "BoostMessageChannel.h"
#import "FlutterBoostPlugin_private.h"
#define NSNull2Nil(_x_) if([_x_ isKindOfClass: NSNull.class]) _x_ = nil;
@interface
FlutterBoostPlugin
()
@end
...
...
@@ -53,6 +55,9 @@
NSDictionary
*
exts
=
args
[
@"exts"
];
NSString
*
uid
=
args
[
@"uniqueId"
];
NSDictionary
*
resultData
=
args
[
@"result"
];
NSNull2Nil
(
exts
);
NSNull2Nil
(
resultData
);
NSNull2Nil
(
uid
);
[[
FlutterBoostPlugin
sharedInstance
].
application
close
:
uid
result:
resultData
exts:
exts
...
...
@@ -70,6 +75,9 @@
NSString
*
url
=
args
[
@"url"
];
NSDictionary
*
urlParams
=
args
[
@"urlParams"
];
NSDictionary
*
exts
=
args
[
@"exts"
];
NSNull2Nil
(
url
);
NSNull2Nil
(
urlParams
);
NSNull2Nil
(
exts
);
[[
FlutterBoostPlugin
sharedInstance
].
application
open
:
url
urlParams:
urlParams
exts:
exts
...
...
@@ -87,7 +95,6 @@
}
+
(
instancetype
)
sharedInstance
{
static
id
_instance
=
nil
;
...
...
@@ -119,12 +126,12 @@
static
dispatch_once_t
onceToken
;
dispatch_once
(
&
onceToken
,
^
{
if
([
platform
respondsToSelector
:
@selector
(
useBoost2
)]
&&
platform
.
useBoost2
){
_factory
=
FLB2Factory
.
new
;
self
->
_factory
=
FLB2Factory
.
new
;
}
else
{
_factory
=
FLBFactory
.
new
;
self
->
_factory
=
FLBFactory
.
new
;
}
_application
=
[
_factory
createApplication
:
platform
];
[
_application
startFlutterWithPlatform
:
platform
self
->
_application
=
[
self
->
_factory
createApplication
:
platform
];
[
self
->
_application
startFlutterWithPlatform
:
platform
onStart:
callback
];
});
}
...
...
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