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
13ba5551
Commit
13ba5551
authored
Sep 06, 2019
by
yangwu.jia
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/20190904' into develop
parents
7cd99953
c35de2ad
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
43 deletions
+75
-43
README.md
README.md
+24
-27
README_CN.md
README_CN.md
+10
-16
android/src/main/AndroidManifest.xml
android/src/main/AndroidManifest.xml
+5
-0
android/src/main/java/com/idlefish/flutterboost/containers/BoostFlutterDefaultActivity.java
.../flutterboost/containers/BoostFlutterDefaultActivity.java
+36
-0
No files found.
README.md
View file @
13ba5551
...
@@ -14,7 +14,7 @@ A next-generation Flutter-Native hybrid solution. FlutterBoost is a Flutter plug
...
@@ -14,7 +14,7 @@ A next-generation Flutter-Native hybrid solution. FlutterBoost is a Flutter plug
<a
name=
"bf647454"
></a>
<a
name=
"bf647454"
></a>
# Prerequisites
# Prerequisites
You need to add Flutter to your project before moving on.
You need to add Flutter to your project before moving on.
The version of the flutter SDK requires v1.5.4-hotfixes, or it will compile error.
# Getting Started
# Getting Started
...
@@ -60,8 +60,6 @@ class _MyAppState extends State<MyApp> {
...
@@ -60,8 +60,6 @@ class _MyAppState extends State<MyApp> {
'sample://secondPage'
:
(
pageName
,
params
,
_
)
=>
SecondRouteWidget
(),
'sample://secondPage'
:
(
pageName
,
params
,
_
)
=>
SecondRouteWidget
(),
});
});
///query current top page and load it
FlutterBoost
.
handleOnStartPage
();
}
}
@override
@override
...
@@ -150,7 +148,7 @@ public class MyApplication extends FlutterApplication {
...
@@ -150,7 +148,7 @@ public class MyApplication extends FlutterApplication {
public
void
onCreate
()
{
public
void
onCreate
()
{
super
.
onCreate
();
super
.
onCreate
();
FlutterBoostPlugin
.
init
(
new
IPlatform
()
{
FlutterBoostPlugin
.
init
(
new
IPlatform
()
{
@Override
@Override
public
Application
getApplication
()
{
public
Application
getApplication
()
{
return
MyApplication
.
this
;
return
MyApplication
.
this
;
...
@@ -163,7 +161,7 @@ public class MyApplication extends FlutterApplication {
...
@@ -163,7 +161,7 @@ public class MyApplication extends FlutterApplication {
@Override
@Override
public
void
openContainer
(
Context
context
,
String
url
,
Map
<
String
,
Object
>
urlParams
,
int
requestCode
,
Map
<
String
,
Object
>
exts
)
{
public
void
openContainer
(
Context
context
,
String
url
,
Map
<
String
,
Object
>
urlParams
,
int
requestCode
,
Map
<
String
,
Object
>
exts
)
{
PageRouter
.
openPageByUrl
(
context
,
url
,
urlParams
,
requestCode
);
//native open url
}
}
@Override
@Override
...
@@ -183,7 +181,7 @@ public class MyApplication extends FlutterApplication {
...
@@ -183,7 +181,7 @@ public class MyApplication extends FlutterApplication {
public
int
whenEngineStart
()
{
public
int
whenEngineStart
()
{
return
ANY_ACTIVITY_CREATED
;
return
ANY_ACTIVITY_CREATED
;
}
}
});
});
}
}
```
```
...
@@ -210,21 +208,16 @@ Android
...
@@ -210,21 +208,16 @@ Android
```
java
```
java
public
class
FlutterPageActivity
extends
BoostFlutterActivity
{
public
class
FlutterPageActivity
extends
BoostFlutterActivity
{
@Override
public
void
onRegisterPlugins
(
PluginRegistry
registry
)
{
//register flutter plugins
GeneratedPluginRegistrant
.
registerWith
(
registry
);
}
@Override
@Override
public
String
getContainer
Name
()
{
public
String
getContainer
Url
()
{
//specify the page name register in FlutterBoost
//specify the page name register in FlutterBoost
return
"sample://firstPage"
;
return
"sample://firstPage"
;
}
}
@Override
@Override
public
Map
getContainerParams
()
{
public
Map
getContainer
Url
Params
()
{
//params of the page
//params of the page
Map
<
String
,
String
>
params
=
new
HashMap
<>();
Map
<
String
,
String
>
params
=
new
HashMap
<>();
params
.
put
(
"key"
,
"value"
);
params
.
put
(
"key"
,
"value"
);
return
params
;
return
params
;
...
@@ -235,21 +228,17 @@ public class FlutterPageActivity extends BoostFlutterActivity {
...
@@ -235,21 +228,17 @@ public class FlutterPageActivity extends BoostFlutterActivity {
or
or
```
java
```
java
public
class
FlutterFragment
extends
BoostFlutterFragment
{
@Override
public
void
onRegisterPlugins
(
PluginRegistry
registry
)
{
GeneratedPluginRegistrant
.
registerWith
(
registry
);
}
@Override
public
class
FlutterFragment
extends
BoostFlutterFragment
{
public
String
getContainerName
()
{
@Override
return
"sample://firstPage"
;
public
String
getContainerUrl
()
{
return
"flutterFragment"
;
}
}
@Override
@Override
public
Map
getContainer
Params
()
{
public
Map
getContainerUrl
Params
()
{
Map
<
String
,
String
>
params
=
new
HashMap
<>();
Map
<
String
,
String
>
params
=
new
HashMap
<>();
params
.
put
(
"
key"
,
"value"
);
params
.
put
(
"
tag"
,
getArguments
().
getString
(
"tag"
)
);
return
params
;
return
params
;
}
}
}
}
...
@@ -264,7 +253,7 @@ Dart
...
@@ -264,7 +253,7 @@ Dart
FlutterBoost
.
singleton
FlutterBoost
.
singleton
.
open
(
"pagename"
)
.
open
(
"pagename"
)
```
```
## Use Flutter Boost to close a page in dart code.
## Use Flutter Boost to close a page in dart code.
...
@@ -282,6 +271,14 @@ Please see the example for details.
...
@@ -282,6 +271,14 @@ Please see the example for details.
# License
# License
This project is licensed under the MIT License - see the
[
LICENSE.md
](
LICENSE.md
)
file for details
This project is licensed under the MIT License - see the
[
LICENSE.md
](
LICENSE.md
)
file for details
# Problem feedback group( dingding group)
<img
width=
"200"
src=
"https://img.alicdn.com/tfs/TB1JSzVeYY1gK0jSZTEXXXDQVXa-892-1213.jpg"
>
## 关于我们
## 关于我们
阿里巴巴-闲鱼技术是国内最早也是最大规模线上运行Flutter的团队。
阿里巴巴-闲鱼技术是国内最早也是最大规模线上运行Flutter的团队。
...
...
README_CN.md
View file @
13ba5551
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
# 前置条件
# 前置条件
在继续之前,您需要将Flutter集成到你现有的项目中。
在继续之前,您需要将Flutter集成到你现有的项目中。
flutter sdk 的版本需要 v1.5.4-hotfixes,否则会编译失败.
# 安装
# 安装
...
@@ -57,8 +57,6 @@ class _MyAppState extends State<MyApp> {
...
@@ -57,8 +57,6 @@ class _MyAppState extends State<MyApp> {
'sample://secondPage'
:
(
pageName
,
params
,
_
)
=>
SecondRouteWidget
(),
'sample://secondPage'
:
(
pageName
,
params
,
_
)
=>
SecondRouteWidget
(),
});
});
///query current top page and load it
FlutterBoost
.
handleOnStartPage
();
}
}
@override
@override
...
@@ -200,20 +198,15 @@ Android
...
@@ -200,20 +198,15 @@ Android
```
java
```
java
public
class
FlutterPageActivity
extends
BoostFlutterActivity
{
public
class
FlutterPageActivity
extends
BoostFlutterActivity
{
@Override
public
void
onRegisterPlugins
(
PluginRegistry
registry
)
{
//register flutter plugins
GeneratedPluginRegistrant
.
registerWith
(
registry
);
}
@Override
@Override
public
String
getContainer
Name
()
{
public
String
getContainer
Url
()
{
//specify the page name register in FlutterBoost
//specify the page name register in FlutterBoost
return
"sample://firstPage"
;
return
"sample://firstPage"
;
}
}
@Override
@Override
public
Map
getContainerParams
()
{
public
Map
getContainer
Url
Params
()
{
//params of the page
//params of the page
Map
<
String
,
String
>
params
=
new
HashMap
<>();
Map
<
String
,
String
>
params
=
new
HashMap
<>();
params
.
put
(
"key"
,
"value"
);
params
.
put
(
"key"
,
"value"
);
...
@@ -226,18 +219,14 @@ public class FlutterPageActivity extends BoostFlutterActivity {
...
@@ -226,18 +219,14 @@ public class FlutterPageActivity extends BoostFlutterActivity {
```
java
```
java
public
class
FlutterFragment
extends
BoostFlutterFragment
{
public
class
FlutterFragment
extends
BoostFlutterFragment
{
@Override
public
void
onRegisterPlugins
(
PluginRegistry
registry
)
{
GeneratedPluginRegistrant
.
registerWith
(
registry
);
}
@Override
@Override
public
String
getContainer
Name
()
{
public
String
getContainer
Url
()
{
return
"sample://firstPage"
;
return
"sample://firstPage"
;
}
}
@Override
@Override
public
Map
getContainerParams
()
{
public
Map
getContainer
Url
Params
()
{
Map
<
String
,
String
>
params
=
new
HashMap
<>();
Map
<
String
,
String
>
params
=
new
HashMap
<>();
params
.
put
(
"key"
,
"value"
);
params
.
put
(
"key"
,
"value"
);
return
params
;
return
params
;
...
@@ -270,6 +259,11 @@ Dart
...
@@ -270,6 +259,11 @@ Dart
该项目根据MIT许可证授权 - 有关详细信息,请参阅[LICENSE.md](LICENSE.md)文件
该项目根据MIT许可证授权 - 有关详细信息,请参阅[LICENSE.md](LICENSE.md)文件
<a
name=
"Acknowledgments"
>
</a>
<a
name=
"Acknowledgments"
>
</a>
# 问题反馈群(钉钉群)
<img
width=
"200"
src=
"https://img.alicdn.com/tfs/TB1JSzVeYY1gK0jSZTEXXXDQVXa-892-1213.jpg"
>
## 关于我们
## 关于我们
阿里巴巴-闲鱼技术是国内最早也是最大规模线上运行Flutter的团队。
阿里巴巴-闲鱼技术是国内最早也是最大规模线上运行Flutter的团队。
...
...
android/src/main/AndroidManifest.xml
View file @
13ba5551
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.idlefish.flutterboost"
>
package=
"com.idlefish.flutterboost"
>
<application>
<activity
android:name=
"com.idlefish.flutterboost.containers.BoostFlutterDefaultActivity"
/>
</application>
</manifest>
</manifest>
android/src/main/java/com/idlefish/flutterboost/containers/BoostFlutterDefaultActivity.java
0 → 100644
View file @
13ba5551
package
com.idlefish.flutterboost.containers
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Intent
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
BoostFlutterDefaultActivity
extends
BoostFlutterActivity
{
@Override
public
String
getContainerUrl
()
{
return
getIntent
().
getStringExtra
(
"url"
);
}
@Override
public
Map
getContainerUrlParams
()
{
return
(
Map
)(
getIntent
().
getSerializableExtra
(
"params"
));
}
private
static
Intent
intent
(
Context
context
,
String
url
,
HashMap
<
String
,
Object
>
params
)
{
final
Intent
intent
=
new
Intent
(
context
,
BoostFlutterDefaultActivity
.
class
);
intent
.
putExtra
(
"url"
,
url
);
intent
.
putExtra
(
"params"
,
params
);
return
intent
;
}
public
static
void
open
(
Context
context
,
String
url
,
HashMap
<
String
,
Object
>
params
)
{
context
.
startActivity
(
intent
(
context
,
url
,
params
));
}
public
static
void
open
(
Activity
activity
,
String
url
,
HashMap
<
String
,
Object
>
params
,
int
requestCode
)
{
activity
.
startActivityForResult
(
intent
(
activity
,
url
,
params
),
requestCode
);
}
}
\ No newline at end of file
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