Commit 9426b40d authored by jinzhu's avatar jinzhu

update

parent a19a09de
......@@ -25,7 +25,7 @@ class _MyAppState extends State<MyApp> {
FlutterBoost.singleton.registerPageBuilders({
'comment_suggest': (pageName, params, _) => CommentSuggest(params),
'message_home': (pageName, params, _) => MessageHomePage(),
'message_home': (pageName, params, _) => MessageHomePage(params),
});
FlutterBoost.handleOnStartPage();
}
......@@ -44,7 +44,7 @@ class _MyAppState extends State<MyApp> {
initialRoute: '/test',//调试的时候可以打开
routes: {
// '/': (context) => CommentSuggest({"Cookie":" _gm_token=7e48641558699683; sessionid=nb3ze4ur7ucosln8sd8pzwojddenv9ym; _gtid=a1bc0a387e1911e996b9525400fa516d4094"}),
'/': (context) => MessageHomePage() ,
'/': (context) => MessageHomePage({}) ,
},//调试的时候可以打开
builder: FlutterBoost.init(postPush: _onRoutePushed),
theme: new ThemeData(
......@@ -65,29 +65,5 @@ class _MyAppState extends State<MyApp> {
void _onRoutePushed(
String pageName, String uniqueId, Map params, Route route, Future _) {
// List<OverlayEntry> newEntries = route.overlayEntries
// .map((OverlayEntry entry) => OverlayEntry(
// builder: (BuildContext context) {
// final pageWidget = entry.builder(context);
// return Stack(
// children: <Widget>[
// pageWidget,
// Positioned(
// child: Text(
// "pageName:$pageName\npageWidget:${pageWidget.toStringShort()}",
// style: TextStyle(fontSize: 12.0, color: Colors.red),
// ),
// left: 8.0,
// top: 8.0,
// )
// ],
// );
// },
// opaque: entry.opaque,
// maintainState: entry.maintainState))
// .toList(growable: true);
//
// route.overlayEntries.clear();
// route.overlayEntries.addAll(newEntries);
}
}
......@@ -179,11 +179,11 @@ class DioUtil {
if (_dio != null) {
_dio.options = _options;
(_dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (client) {
client.findProxy = (url) {
return _isDebug ? 'PROXY $_proxy' : 'DIRECT';
};
};
// (_dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (client) {
// client.findProxy = (url) {
// return _isDebug ? 'PROXY $_proxy' : 'DIRECT';
// };
// };
if (_pem != null) {
// httpClientAdapter
(_dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (client) {
......
import 'package:flutter/material.dart';
import 'package:dio/dio.dart';
// import 'package:gmalpha_flutter/model/message/message.dart' as prefix0;
import 'package:gmalpha_flutter/pages/message/home/message_notification_item.dart';
import 'message_item.dart';
......@@ -8,16 +9,32 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
class MessageHomePage extends StatefulWidget {
final Map params;
MessageHomePage(this.params);
@override
_MessageHomePageState createState() => _MessageHomePageState();
_MessageHomePageState createState() => _MessageHomePageState(params);
}
class _MessageHomePageState extends State<MessageHomePage> {
final Map nativeCookie;
_MessageHomePageState(this.nativeCookie);
List<ListItem> messageList = List<ListItem>();
List<ListItem> dataArr = List<ListItem>();
int pageIndex = 1;
List<String> data1 = [];
@override
void initState() {
if (nativeCookie.keys.length > 0) {
BaseOptions options = DioUtil.getDefOptions();
Map<String, dynamic> cookie = {'cookie': '_gm_token=4cabd51562739648; _gtid=fac513b6a2bf11e9acfd525400e5c7a38141; sessionid=7j7s902fmro0pvybwrp374khvva6l3xf;'};
HttpConfig config = new HttpConfig(options: options, nativeCookie:cookie);
DioUtil().setConfig(config);
}
super.initState();
}
RefreshController _refreshController =
RefreshController(initialRefresh: true);
......
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