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