Commit 68c175a6 authored by yangwu.jia's avatar yangwu.jia

Update readme

parent 0b33f1ba
......@@ -163,7 +163,7 @@ public class MyApplication extends FlutterApplication {
@Override
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
......@@ -210,20 +210,15 @@ Android
```java
public class FlutterPageActivity extends BoostFlutterActivity {
@Override
public void onRegisterPlugins(PluginRegistry registry) {
//register flutter plugins
GeneratedPluginRegistrant.registerWith(registry);
}
@Override
public String getContainerName() {
public String getContainerUrl() {
//specify the page name register in FlutterBoost
return "sample://firstPage";
}
@Override
public Map getContainerParams() {
public Map getContainerUrlParams() {
//params of the page
Map<String,String> params = new HashMap<>();
params.put("key","value");
......@@ -235,21 +230,17 @@ public class FlutterPageActivity extends BoostFlutterActivity {
or
```java
public class FlutterFragment extends BoostFlutterFragment {
@Override
public void onRegisterPlugins(PluginRegistry registry) {
GeneratedPluginRegistrant.registerWith(registry);
}
public class FlutterFragment extends BoostFlutterFragment {
@Override
public String getContainerName() {
return "sample://firstPage";
public String getContainerUrl() {
return "flutterFragment";
}
@Override
public Map getContainerParams() {
public Map getContainerUrlParams() {
Map<String,String> params = new HashMap<>();
params.put("key","value");
params.put("tag",getArguments().getString("tag"));
return params;
}
}
......
......@@ -200,20 +200,15 @@ Android
```java
public class FlutterPageActivity extends BoostFlutterActivity {
@Override
public void onRegisterPlugins(PluginRegistry registry) {
//register flutter plugins
GeneratedPluginRegistrant.registerWith(registry);
}
@Override
public String getContainerName() {
public String getContainerUrl() {
//specify the page name register in FlutterBoost
return "sample://firstPage";
}
@Override
public Map getContainerParams() {
public Map getContainerUrlParams() {
//params of the page
Map<String,String> params = new HashMap<>();
params.put("key","value");
......@@ -226,18 +221,14 @@ public class FlutterPageActivity extends BoostFlutterActivity {
```java
public class FlutterFragment extends BoostFlutterFragment {
@Override
public void onRegisterPlugins(PluginRegistry registry) {
GeneratedPluginRegistrant.registerWith(registry);
}
@Override
public String getContainerName() {
public String getContainerUrl() {
return "sample://firstPage";
}
@Override
public Map getContainerParams() {
public Map getContainerUrlParams() {
Map<String,String> params = new HashMap<>();
params.put("key","value");
return params;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment