Commit 2ded43cd authored by 艾娇平's avatar 艾娇平

加上title

parent 3b157295
......@@ -2,6 +2,7 @@ import 'dart:async';
import 'package:flutter/services.dart';
import '../services/ALNetClient.dart';
import 'dart:convert';
import 'dart:typed_data';
typedef Future<dynamic> MethodHandler(MethodCall call);
......@@ -42,13 +43,21 @@ class HybridStackManagerPlugin {
// method 0: GET 1:POST
Future<Map> callNativeNetWorking({String url, HttpMethod method,Map parameters}) async {
dynamic info = _channel.invokeMethod('openUrlFromNative', {
dynamic info = await _channel.invokeMethod('callNativeNetWorking', {
"url": url ?? "",
"method": 1 ?? 0,
"parameters": (parameters ?? {}),
});
print('callNativeNetWorking-----${info.toString()}');
// Uint8List response = info;
// Map streetsList = new Map.from(info);
return new Future.sync(() => jsonDecode(info.toString()) as Map);
return new Future.sync(() => info as Map);
// print('callNativeNetWorking-----${streetsList}');
// return new Future.sync(() => streetsList as Map);
// print('callNativeNetWorking-----${info.toString()}');
//
// return new Future.sync(() => jsonDecode(info.toString()) as Map);
}
}
......@@ -14,6 +14,8 @@ class XMaterialPageRoute<T> extends MaterialPageRoute<T> {
final WidgetBuilder builder;
final bool animated;
final GlobalKey boundaryKey;
Duration get transitionDuration {
if (animated == true) return const Duration(milliseconds: 300);
return const Duration(milliseconds: 0);
......
......@@ -17,9 +17,8 @@ class Opinion extends StatelessWidget {
Opinion(RouterOption option, {Key key}) : super(key: key) {
routeOption = option;
}
String title;
Widget build(BuildContext context) {
// Map m = Utils.parseUniquePageName(routeOption.userInfo);
return MaterialApp(
debugShowCheckedModeBanner: false,
title: '意见与建议',
......@@ -33,10 +32,10 @@ class Opinion extends StatelessWidget {
}
class OpinionPage extends StatefulWidget {
OpinionPage({Key key, this.title}) : super(key: key);
OpinionPage({Key key, this.title,this.userId}) : super(key: key);
final String title;
final String userId;
@override
_OpinionPageState createState() => _OpinionPageState();
}
......
......@@ -20,8 +20,6 @@ dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
json_annotation: ^2.0.0
# 网络
......
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