Commit 2667fd64 authored by justin's avatar justin

指定参数类型

parent b4045960
...@@ -194,7 +194,7 @@ public class FlutterBoostPlugin { ...@@ -194,7 +194,7 @@ public class FlutterBoostPlugin {
FlutterViewContainerManager mManager = (FlutterViewContainerManager) FlutterBoost.instance().containerManager(); FlutterViewContainerManager mManager = (FlutterViewContainerManager) FlutterBoost.instance().containerManager();
switch (methodCall.method) { switch (methodCall.method) {
case "pageOnStart": { case "pageOnStart": {
Map<String, Object> pageInfo = new HashMap<>(); Map<String, Object> pageInfo = new HashMap<String, Object>();
try { try {
IContainerRecord record = mManager.getCurrentTopRecord(); IContainerRecord record = mManager.getCurrentTopRecord();
......
...@@ -72,7 +72,7 @@ public class BoostFlutterActivity extends Activity ...@@ -72,7 +72,7 @@ public class BoostFlutterActivity extends Activity
private final Class<? extends BoostFlutterActivity> activityClass; private final Class<? extends BoostFlutterActivity> activityClass;
private String backgroundMode = DEFAULT_BACKGROUND_MODE; private String backgroundMode = DEFAULT_BACKGROUND_MODE;
private String url = ""; private String url = "";
private Map params = new HashMap(); private Map<String ,Object> params = new HashMap();
public NewEngineIntentBuilder(@NonNull Class<? extends BoostFlutterActivity> activityClass) { public NewEngineIntentBuilder(@NonNull Class<? extends BoostFlutterActivity> activityClass) {
...@@ -86,7 +86,7 @@ public class BoostFlutterActivity extends Activity ...@@ -86,7 +86,7 @@ public class BoostFlutterActivity extends Activity
} }
public NewEngineIntentBuilder params(@NonNull Map params) { public NewEngineIntentBuilder params(@NonNull Map<String ,Object> params) {
this.params = params; this.params = params;
return this; return this;
} }
...@@ -478,14 +478,14 @@ public class BoostFlutterActivity extends Activity ...@@ -478,14 +478,14 @@ public class BoostFlutterActivity extends Activity
} }
@Override @Override
public Map getContainerUrlParams() { public Map<String ,Object> getContainerUrlParams() {
if (getIntent().hasExtra(EXTRA_PARAMS)) { if (getIntent().hasExtra(EXTRA_PARAMS)) {
SerializableMap serializableMap = (SerializableMap) getIntent().getSerializableExtra(EXTRA_PARAMS); SerializableMap serializableMap = (SerializableMap) getIntent().getSerializableExtra(EXTRA_PARAMS);
return serializableMap.getMap(); return serializableMap.getMap();
} }
Map<String, String> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
return params; return params;
} }
......
...@@ -390,7 +390,7 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContainer ...@@ -390,7 +390,7 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContainer
} }
@Override @Override
public Map getContainerUrlParams() { public Map<String,Object> getContainerUrlParams() {
return this.host.getContainerUrlParams(); return this.host.getContainerUrlParams();
} }
...@@ -482,7 +482,7 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContainer ...@@ -482,7 +482,7 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContainer
String getContainerUrl(); String getContainerUrl();
Map getContainerUrlParams(); Map<String ,Object> getContainerUrlParams();
} }
......
...@@ -521,7 +521,7 @@ public class FlutterFragment extends Fragment implements FlutterActivityAndFragm ...@@ -521,7 +521,7 @@ public class FlutterFragment extends Fragment implements FlutterActivityAndFragm
} }
@Override @Override
public Map getContainerUrlParams() { public Map<String, Object> getContainerUrlParams() {
BoostFlutterActivity.SerializableMap serializableMap = (BoostFlutterActivity.SerializableMap) getArguments().getSerializable(EXTRA_PARAMS); BoostFlutterActivity.SerializableMap serializableMap = (BoostFlutterActivity.SerializableMap) getArguments().getSerializable(EXTRA_PARAMS);
......
...@@ -58,7 +58,7 @@ public interface IFlutterViewContainer { ...@@ -58,7 +58,7 @@ public interface IFlutterViewContainer {
* container params * container params
* @return * @return
*/ */
Map getContainerUrlParams(); Map<String,Object> getContainerUrlParams();
/** /**
* callback when container shown * callback when container shown
......
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