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
331b780b
Commit
331b780b
authored
Jun 16, 2020
by
骁战
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
other##增加初始化时自定义shellArgs的能力
parent
471349fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
android/src/main/java/com/idlefish/flutterboost/FlutterBoost.java
...src/main/java/com/idlefish/flutterboost/FlutterBoost.java
+14
-5
android/src/main/java/com/idlefish/flutterboost/Platform.java
...oid/src/main/java/com/idlefish/flutterboost/Platform.java
+3
-1
No files found.
android/src/main/java/com/idlefish/flutterboost/FlutterBoost.java
View file @
331b780b
...
...
@@ -18,7 +18,9 @@ import io.flutter.embedding.engine.loader.FlutterLoader;
import
io.flutter.view.FlutterMain
;
import
java.lang.reflect.Method
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
class
FlutterBoost
{
...
...
@@ -212,10 +214,9 @@ public class FlutterBoost {
private
INativeRouter
router
=
null
;
private
BoostLifecycleListener
lifecycleListener
;
private
List
<
String
>
shellArgs
;
private
BoostLifecycleListener
lifecycleListener
;
public
ConfigBuilder
(
Application
app
,
INativeRouter
router
)
{
this
.
router
=
router
;
...
...
@@ -247,12 +248,16 @@ public class FlutterBoost {
return
this
;
}
public
ConfigBuilder
lifecycleListener
(
BoostLifecycleListener
lifecycleListener
)
{
this
.
lifecycleListener
=
lifecycleListener
;
return
this
;
}
public
ConfigBuilder
shellArgs
(
List
<
String
>
shellArgs
)
{
this
.
shellArgs
=
shellArgs
;
return
this
;
}
public
Platform
build
()
{
Platform
platform
=
new
Platform
()
{
...
...
@@ -284,6 +289,10 @@ public class FlutterBoost {
public
FlutterView
.
RenderMode
renderMode
()
{
return
ConfigBuilder
.
this
.
renderMode
;
}
public
List
<
String
>
shellArgs
()
{
return
ConfigBuilder
.
this
.
shellArgs
;
}
};
platform
.
lifecycleListener
=
this
.
lifecycleListener
;
...
...
@@ -318,7 +327,7 @@ public class FlutterBoost {
if
(
mEngine
==
null
)
{
FlutterMain
.
startInitialization
(
mPlatform
.
getApplication
());
FlutterShellArgs
flutterShellArgs
=
new
FlutterShellArgs
(
new
String
[
0
]
);
FlutterShellArgs
flutterShellArgs
=
new
FlutterShellArgs
(
mPlatform
.
shellArgs
()
!=
null
?
mPlatform
.
shellArgs
()
:
Arrays
.
asList
(
""
)
);
FlutterMain
.
ensureInitializationComplete
(
mPlatform
.
getApplication
().
getApplicationContext
(),
flutterShellArgs
.
toArray
());
...
...
android/src/main/java/com/idlefish/flutterboost/Platform.java
View file @
331b780b
...
...
@@ -6,6 +6,7 @@ import android.util.Log;
import
com.idlefish.flutterboost.interfaces.IContainerRecord
;
import
java.lang.reflect.Method
;
import
java.util.List
;
import
java.util.Map
;
import
io.flutter.embedding.android.FlutterView
;
...
...
@@ -40,8 +41,9 @@ public abstract class Platform {
public
abstract
String
initialRoute
();
public
FlutterBoost
.
BoostLifecycleListener
lifecycleListener
;
public
abstract
List
<
String
>
shellArgs
()
;
public
FlutterBoost
.
BoostLifecycleListener
lifecycleListener
;
public
void
closeContainer
(
IContainerRecord
record
,
Map
<
String
,
Object
>
result
,
Map
<
String
,
Object
>
exts
)
{
if
(
record
==
null
)
return
;
...
...
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