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
5d05f740
Commit
5d05f740
authored
Jul 01, 2019
by
Jidong Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1, dart entry name
2, close params
parent
50e7acc7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
8 deletions
+52
-8
ios/Classes/1.5/FLB2FlutterApplication.m
ios/Classes/1.5/FLB2FlutterApplication.m
+1
-1
ios/Classes/1.5/FLB2FlutterEngine.h
ios/Classes/1.5/FLB2FlutterEngine.h
+2
-0
ios/Classes/1.5/FLB2FlutterEngine.m
ios/Classes/1.5/FLB2FlutterEngine.m
+14
-3
ios/Classes/Boost/FLB2Platform.h
ios/Classes/Boost/FLB2Platform.h
+3
-0
lib/flutter_boost.dart
lib/flutter_boost.dart
+32
-4
No files found.
ios/Classes/1.5/FLB2FlutterApplication.m
View file @
5d05f740
...
...
@@ -64,7 +64,7 @@
static
dispatch_once_t
onceToken
;
dispatch_once
(
&
onceToken
,
^
{
self
.
platform
=
platform
;
self
.
viewProvider
=
FLB2FlutterEngine
.
new
;
self
.
viewProvider
=
[[
FLB2FlutterEngine
alloc
]
initWithPlatform
:
platform
]
;
self
.
isRunning
=
YES
;
if
(
callback
)
callback
(
self
.
viewProvider
.
engine
);
});
...
...
ios/Classes/1.5/FLB2FlutterEngine.h
View file @
5d05f740
...
...
@@ -24,8 +24,10 @@
#import <Foundation/Foundation.h>
#import "FLB2FlutterProvider.h"
#import "FLB2Platform.h"
NS_ASSUME_NONNULL_BEGIN
@interface
FLB2FlutterEngine
:
NSObject
<
FLB2FlutterProvider
>
-
(
instancetype
)
initWithPlatform
:(
id
<
FLB2Platform
>
)
platform
;
@end
NS_ASSUME_NONNULL_END
ios/Classes/1.5/FLB2FlutterEngine.m
View file @
5d05f740
...
...
@@ -33,15 +33,21 @@
@end
@implementation
FLB2FlutterEngine
-
(
instancetype
)
init
-
(
instancetype
)
init
WithPlatform
:(
id
<
FLB2Platform
>
)
platform
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
if
(
self
=
[
super
init
])
{
_engine
=
[[
FlutterEngine
alloc
]
initWithName
:
@"io.flutter"
project
:
nil
];
[
_engine
runWithEntrypoint
:
nil
];
if
(
platform
&&
[
platform
respondsToSelector
:
@selector
(
entryForDart
)]
&&
platform
.
entryForDart
){
[
_engine
runWithEntrypoint
:
platform
.
entryForDart
];
}
else
{
[
_engine
runWithEntrypoint
:
nil
];
}
_dummy
=
[[
FLB2FlutterViewContainer
alloc
]
initWithEngine
:
_engine
nibName:
nil
bundle:
nil
];
...
...
@@ -58,6 +64,11 @@
#pragma clang diagnostic pop
}
-
(
instancetype
)
init
{
return
[
self
initWithPlatform
:
nil
];
}
-
(
void
)
pause
{
[[
_engine
lifecycleChannel
]
sendMessage
:
@"AppLifecycleState.pause"
];
...
...
ios/Classes/Boost/FLB2Platform.h
View file @
5d05f740
...
...
@@ -26,6 +26,9 @@
NS_ASSUME_NONNULL_BEGIN
@protocol
FLB2Platform
<
NSObject
>
@optional
-
(
NSString
*
)
entryForDart
;
@required
-
(
void
)
open
:(
NSString
*
)
url
urlParams
:(
NSDictionary
*
)
urlParams
...
...
lib/flutter_boost.dart
View file @
5d05f740
...
...
@@ -123,11 +123,25 @@ class FlutterBoost {
assert
(
id
!=
null
);
BoostContainerSettings
settings
=
containerManager
?.
onstageSettings
;
Map
<
String
,
dynamic
>
properties
=
new
Map
<
String
,
dynamic
>();
if
(
exts
==
null
){
exts
=
Map
<
dynamic
,
dynamic
>();
}
exts
[
"params"
]
=
settings
.
params
;
if
(!
exts
.
containsKey
(
"animated"
)){
exts
[
"animated"
]
=
true
;
}
properties
[
"uniqueId"
]
=
id
;
if
(
result
!=
null
)
{
properties
[
"result"
]
=
result
;
}
if
(
exts
!=
null
)
{
properties
[
"exts"
]
=
exts
;
}
...
...
@@ -135,13 +149,27 @@ class FlutterBoost {
}
Future
<
bool
>
closeCurrent
({
Map
<
dynamic
,
dynamic
>
result
,
Map
<
dynamic
,
dynamic
>
exts
})
{
String
id
=
containerManager
?.
onstageSettings
?.
uniqueId
;
return
close
(
id
,
result:
result
,
exts:
exts
);
BoostContainerSettings
settings
=
containerManager
?.
onstageSettings
;
if
(
exts
==
null
){
exts
=
Map
<
dynamic
,
dynamic
>();
}
exts
[
"params"
]
=
settings
.
params
;
if
(!
exts
.
containsKey
(
"animated"
)){
exts
[
"animated"
]
=
true
;
}
return
close
(
settings
.
uniqueId
,
result:
result
,
exts:
exts
);
}
Future
<
bool
>
closeByContext
(
BuildContext
context
,{
Map
<
dynamic
,
dynamic
>
result
,
Map
<
dynamic
,
dynamic
>
exts
})
{
String
id
=
BoostContainer
.
of
(
context
)?.
settings
?.
uniqueId
;
return
close
(
id
,
result:
result
,
exts:
exts
);
BoostContainerSettings
settings
=
containerManager
?.
onstageSettings
;
if
(
exts
==
null
){
exts
=
Map
<
dynamic
,
dynamic
>();
}
exts
[
"params"
]
=
settings
.
params
;
if
(!
exts
.
containsKey
(
"animated"
)){
exts
[
"animated"
]
=
true
;
}
return
close
(
settings
.
uniqueId
,
result:
result
,
exts:
exts
);
}
///register for Container changed callbacks
...
...
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