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

Update readme

parent 0b33f1ba
...@@ -163,7 +163,7 @@ public class MyApplication extends FlutterApplication { ...@@ -163,7 +163,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
...@@ -210,20 +210,15 @@ Android ...@@ -210,20 +210,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 getContainerName() { public String getContainerUrl() {
//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 getContainerUrlParams() {
//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");
...@@ -235,21 +230,17 @@ public class FlutterPageActivity extends BoostFlutterActivity { ...@@ -235,21 +230,17 @@ public class FlutterPageActivity extends BoostFlutterActivity {
or or
```java ```java
public class FlutterFragment extends BoostFlutterFragment {
@Override
public void onRegisterPlugins(PluginRegistry registry) {
GeneratedPluginRegistrant.registerWith(registry);
}
public class FlutterFragment extends BoostFlutterFragment {
@Override @Override
public String getContainerName() { public String getContainerUrl() {
return "sample://firstPage"; return "flutterFragment";
} }
@Override @Override
public Map getContainerParams() { public Map getContainerUrlParams() {
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;
} }
} }
......
...@@ -200,20 +200,15 @@ Android ...@@ -200,20 +200,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 getContainerName() { public String getContainerUrl() {
//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 getContainerUrlParams() {
//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 +221,14 @@ public class FlutterPageActivity extends BoostFlutterActivity { ...@@ -226,18 +221,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 getContainerName() { public String getContainerUrl() {
return "sample://firstPage"; return "sample://firstPage";
} }
@Override @Override
public Map getContainerParams() { public Map getContainerUrlParams() {
Map<String,String> params = new HashMap<>(); Map<String,String> params = new HashMap<>();
params.put("key","value"); params.put("key","value");
return params; 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