Commit a901700f authored by Jidong Chen's avatar Jidong Chen

interface paramter type.

parent 23d41278
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
#import "BoostMessageChannel.h" #import "BoostMessageChannel.h"
#import "FlutterBoostPlugin_private.h" #import "FlutterBoostPlugin_private.h"
@implementation BoostMessageChannel @implementation BoostMessageChannel
+ (NSMutableDictionary *)lists{ + (NSMutableDictionary *)lists{
static NSMutableDictionary *_list = nil; static NSMutableDictionary *_list = nil;
...@@ -87,8 +87,6 @@ ...@@ -87,8 +87,6 @@
} }
} }
+ (void)onNativePageResult:(void (^)(NSNumber *))result uniqueId:(NSString *)uniqueId key:(NSString *)key resultData:(NSDictionary *)resultData params:(NSDictionary *)params + (void)onNativePageResult:(void (^)(NSNumber *))result uniqueId:(NSString *)uniqueId key:(NSString *)key resultData:(NSDictionary *)resultData params:(NSDictionary *)params
{ {
NSMutableDictionary *tmp = [NSMutableDictionary dictionary]; NSMutableDictionary *tmp = [NSMutableDictionary dictionary];
......
...@@ -51,7 +51,7 @@ class FlutterBoost { ...@@ -51,7 +51,7 @@ class FlutterBoost {
GlobalKey<ContainerManagerState>(); GlobalKey<ContainerManagerState>();
final ObserversHolder _observersHolder = ObserversHolder(); final ObserversHolder _observersHolder = ObserversHolder();
final Router _router = Router(); final Router _router = Router();
final MethodChannel _methodChannel = MethodChannel('flutter_boost_method'); final MethodChannel _methodChannel = MethodChannel('flutter_boost');
int _callbackID = 0; int _callbackID = 0;
...@@ -140,7 +140,7 @@ class FlutterBoost { ...@@ -140,7 +140,7 @@ class FlutterBoost {
ContainerCoordinator.singleton.registerPageBuilders(builders); ContainerCoordinator.singleton.registerPageBuilders(builders);
} }
Future<Map<dynamic,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}){
if(urlParams == null) { if(urlParams == null) {
urlParams = Map(); urlParams = Map();
} }
...@@ -152,7 +152,7 @@ class FlutterBoost { ...@@ -152,7 +152,7 @@ class FlutterBoost {
return _router.open(url,urlParams: urlParams,exts: exts); return _router.open(url,urlParams: urlParams,exts: exts);
} }
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}){
if(result == null) { if(result == null) {
result = Map(); result = Map();
} }
...@@ -172,7 +172,7 @@ class FlutterBoost { ...@@ -172,7 +172,7 @@ class FlutterBoost {
BoostMessageChannel.sendEvent(name, arguments); BoostMessageChannel.sendEvent(name, arguments);
} }
Future<Map<String,dynamic>> openPage(String name, Map params,{bool animated}) { Future<Map<dynamic,dynamic>> openPage(String name, Map params,{bool animated}) {
Map<String,dynamic> exts = Map(); Map<String,dynamic> exts = Map();
if(animated != null){ if(animated != null){
exts["animated"] = animated; exts["animated"] = animated;
......
...@@ -128,7 +128,7 @@ class BoostMessageChannel { ...@@ -128,7 +128,7 @@ class BoostMessageChannel {
}); });
} }
static Future<bool> closePage(String uniqueId,{Map<String,dynamic> result,Map<String,dynamic> exts}) { static Future<bool> closePage(String uniqueId,{Map<dynamic,dynamic> result,Map<dynamic,dynamic> exts}) {
Map<String,dynamic> properties = new Map<String,dynamic>(); Map<String,dynamic> properties = new Map<String,dynamic>();
properties["uniqueId"]=uniqueId; properties["uniqueId"]=uniqueId;
if(result != null){ if(result != null){
......
...@@ -30,11 +30,11 @@ import 'package:flutter_boost/messaging/boost_message_channel.dart'; ...@@ -30,11 +30,11 @@ import 'package:flutter_boost/messaging/boost_message_channel.dart';
class Router { class Router {
Future<Map<dynamic,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}){
return BoostMessageChannel.openPage(url,urlParams, exts); return BoostMessageChannel.openPage(url,urlParams, exts);
} }
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}){
return BoostMessageChannel.closePage(id,result:result,exts: exts); return BoostMessageChannel.closePage(id,result:result,exts: exts);
} }
......
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