Commit 8347006a authored by 余玠's avatar 余玠 Committed by Luke

回滚master上关于map参数的设定,master上使用dynamic做为map的key,但在闲鱼环境中因为legacy code都是用String,所以为了适配而回滚

parent e74ff8de
...@@ -42,7 +42,7 @@ class FirstRouteWidget extends StatelessWidget { ...@@ -42,7 +42,7 @@ class FirstRouteWidget extends StatelessWidget {
child: Text('Present second route'), child: Text('Present second route'),
onPressed: () { onPressed: () {
print("Present second page!"); print("Present second page!");
FlutterBoost.singleton.open("second",urlParams:<dynamic,dynamic>{"present":true}).then((Map value) { FlutterBoost.singleton.open("second",urlParams:<String,dynamic>{"present":true}).then((Map value) {
print( print(
"call me when page is finished. did recieve second route result $value"); "call me when page is finished. did recieve second route result $value");
}); });
...@@ -90,7 +90,7 @@ class SecondRouteWidget extends StatelessWidget { ...@@ -90,7 +90,7 @@ class SecondRouteWidget extends StatelessWidget {
BoostContainerSettings settings = BoostContainerSettings settings =
BoostContainer.of(context).settings; BoostContainer.of(context).settings;
FlutterBoost.singleton.close(settings.uniqueId, FlutterBoost.singleton.close(settings.uniqueId,
result: <dynamic,dynamic>{"result": "data from second"}); result: <String,dynamic>{"result": "data from second"});
}, },
child: Text('Go back with result!'), child: Text('Go back with result!'),
), ),
...@@ -206,7 +206,7 @@ class _FlutterRouteWidgetState extends State<FlutterRouteWidget> { ...@@ -206,7 +206,7 @@ class _FlutterRouteWidgetState extends State<FlutterRouteWidget> {
///后面的参数会在native的IPlatform.startActivity方法回调中拼接到url的query部分。 ///后面的参数会在native的IPlatform.startActivity方法回调中拼接到url的query部分。
///例如:sample://nativePage?aaa=bbb ///例如:sample://nativePage?aaa=bbb
onTap: () => FlutterBoost.singleton onTap: () => FlutterBoost.singleton
.open("sample://nativePage", urlParams: <dynamic,dynamic>{ .open("sample://nativePage", urlParams: <String,dynamic>{
"query": {"aaa": "bbb"} "query": {"aaa": "bbb"}
}), }),
), ),
...@@ -223,7 +223,7 @@ class _FlutterRouteWidgetState extends State<FlutterRouteWidget> { ...@@ -223,7 +223,7 @@ class _FlutterRouteWidgetState extends State<FlutterRouteWidget> {
///后面的参数会在native的IPlatform.startActivity方法回调中拼接到url的query部分。 ///后面的参数会在native的IPlatform.startActivity方法回调中拼接到url的query部分。
///例如:sample://nativePage?aaa=bbb ///例如:sample://nativePage?aaa=bbb
onTap: () => FlutterBoost.singleton onTap: () => FlutterBoost.singleton
.open("first", urlParams: <dynamic,dynamic>{ .open("first", urlParams: <String,dynamic>{
"query": {"aaa": "bbb"} "query": {"aaa": "bbb"}
}), }),
), ),
...@@ -240,7 +240,7 @@ class _FlutterRouteWidgetState extends State<FlutterRouteWidget> { ...@@ -240,7 +240,7 @@ class _FlutterRouteWidgetState extends State<FlutterRouteWidget> {
///后面的参数会在native的IPlatform.startActivity方法回调中拼接到url的query部分。 ///后面的参数会在native的IPlatform.startActivity方法回调中拼接到url的query部分。
///例如:sample://nativePage?aaa=bbb ///例如:sample://nativePage?aaa=bbb
onTap: () => FlutterBoost.singleton onTap: () => FlutterBoost.singleton
.open("second", urlParams:<dynamic,dynamic> { .open("second", urlParams:<String,dynamic> {
"query": {"aaa": "bbb"} "query": {"aaa": "bbb"}
}), }),
), ),
...@@ -257,7 +257,7 @@ class _FlutterRouteWidgetState extends State<FlutterRouteWidget> { ...@@ -257,7 +257,7 @@ class _FlutterRouteWidgetState extends State<FlutterRouteWidget> {
///后面的参数会在native的IPlatform.startActivity方法回调中拼接到url的query部分。 ///后面的参数会在native的IPlatform.startActivity方法回调中拼接到url的query部分。
///例如:sample://nativePage?aaa=bbb ///例如:sample://nativePage?aaa=bbb
onTap: () => FlutterBoost.singleton onTap: () => FlutterBoost.singleton
.open("tab", urlParams:<dynamic,dynamic> { .open("tab", urlParams:<String,dynamic> {
"query": {"aaa": "bbb"} "query": {"aaa": "bbb"}
}), }),
), ),
...@@ -274,7 +274,7 @@ class _FlutterRouteWidgetState extends State<FlutterRouteWidget> { ...@@ -274,7 +274,7 @@ class _FlutterRouteWidgetState extends State<FlutterRouteWidget> {
///后面的参数会在native的IPlatform.startActivity方法回调中拼接到url的query部分。 ///后面的参数会在native的IPlatform.startActivity方法回调中拼接到url的query部分。
///例如:sample://nativePage?aaa=bbb ///例如:sample://nativePage?aaa=bbb
onTap: () => FlutterBoost.singleton onTap: () => FlutterBoost.singleton
.open("sample://flutterPage", urlParams:<dynamic,dynamic> { .open("sample://flutterPage", urlParams:<String,dynamic> {
"query": {"aaa": "bbb"} "query": {"aaa": "bbb"}
}), }),
), ),
......
...@@ -121,8 +121,8 @@ class FlutterBoost { ...@@ -121,8 +121,8 @@ class FlutterBoost {
} }
Future<Map<dynamic, dynamic>> open(String url, Future<Map<dynamic, dynamic>> open(String url,
{Map<dynamic, dynamic> urlParams, Map<dynamic, dynamic> exts}) { {Map<String, dynamic> urlParams, Map<String, dynamic> exts}) {
Map<dynamic, dynamic> properties = new Map<dynamic, dynamic>(); Map<dynamic, dynamic> properties = new Map<String, dynamic>();
properties["url"] = url; properties["url"] = url;
properties["urlParams"] = urlParams; properties["urlParams"] = urlParams;
properties["exts"] = exts; properties["exts"] = exts;
...@@ -130,14 +130,14 @@ class FlutterBoost { ...@@ -130,14 +130,14 @@ class FlutterBoost {
} }
Future<bool> close(String id, Future<bool> close(String id,
{Map<dynamic, dynamic> result, Map<dynamic, dynamic> exts}) { {Map<String, dynamic> result, Map<String, dynamic> exts}) {
assert(id != null); assert(id != null);
BoostContainerSettings settings = containerManager?.onstageSettings; BoostContainerSettings settings = containerManager?.onstageSettings;
Map<dynamic, dynamic> properties = new Map<dynamic, dynamic>(); Map<dynamic, dynamic> properties = new Map<String, dynamic>();
if (exts == null) { if (exts == null) {
exts = Map<dynamic, dynamic>(); exts = Map<String, 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