Commit 25a4bc3d authored by 余玠's avatar 余玠

fixbug:解决回调时类型转换异常导致的代码执行不到

parent e10b101d
...@@ -180,6 +180,9 @@ ...@@ -180,6 +180,9 @@
static int64_t sCallbackID = 1; static int64_t sCallbackID = 1;
cid = @(sCallbackID).stringValue; cid = @(sCallbackID).stringValue;
sCallbackID += 2; sCallbackID += 2;
NSMutableDictionary *newParams = [[NSMutableDictionary alloc]initWithDictionary:urlParams];
[newParams setObject:cid?cid:@"__default#0__" forKey:kPageCallBackId];
urlParams = newParams;
} }
_callbackCache[cid] = resultCallback; _callbackCache[cid] = resultCallback;
......
...@@ -95,25 +95,25 @@ class FlutterBoost { ...@@ -95,25 +95,25 @@ class FlutterBoost {
ContainerCoordinator.singleton.registerPageBuilders(builders); ContainerCoordinator.singleton.registerPageBuilders(builders);
} }
Future<Map<String,dynamic>> open(String url,{Map<String,dynamic> urlParams,Map<String,dynamic> exts}){ Future<Map<dynamic,dynamic>> open(String url,{Map<dynamic,dynamic> urlParams,Map<dynamic,dynamic> exts}){
Map<String, dynamic> properties = new Map<String, dynamic>(); Map<dynamic, dynamic> properties = new Map<dynamic, dynamic>();
properties["url"] = url; properties["url"] = url;
properties["urlParams"] = urlParams; properties["urlParams"] = urlParams;
properties["exts"] = exts; properties["exts"] = exts;
return channel.invokeMethod<Map<String,dynamic>>( return channel.invokeMethod<Map<dynamic,dynamic>>(
'openPage', properties); 'openPage', properties);
} }
Future<bool> close(String id,{Map<String,dynamic> result,Map<String,dynamic> exts}){ Future<bool> close(String id,{Map<dynamic,dynamic> result,Map<dynamic,dynamic> exts}){
assert(id != null); assert(id != null);
BoostContainerSettings settings = containerManager?.onstageSettings; BoostContainerSettings settings = containerManager?.onstageSettings;
Map<String, dynamic> properties = new Map<String, dynamic>(); Map<dynamic, dynamic> properties = new Map<dynamic, dynamic>();
if(exts == null){ if(exts == null){
exts = Map<String,dynamic>(); exts = Map<dynamic,dynamic>();
} }
exts["params"] = settings.params; exts["params"] = settings.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