1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/*
* @author lsy
* @date 2019-10-13
**/
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:gmalpha_flutter/Annotations/RouterCenterRestore.mark.dart';
import 'package:gmalpha_flutter/commonModel/net/Api.dart';
import 'package:gmalpha_flutter/res/anim/Anim.dart';
import 'commonModel/GMBase.dart';
class TestPage extends StatelessWidget {
TestPage() {
Api.getInstance().setDioCookie({
'Cookie':
'sessionid=k96qdzwb3bquf87g32kdfbn676jkfnmk; _gtid=6bcbb61eebf411e9bfa4525400e82fab7541; _gm_token=e0fc1c1570864112'
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: baseAppBar(title: "flutter测试", centerTitle: true),
body: Container(
child: ListView(
children: <Widget>[
testReportPage(context),
presigePage(context),
albumPage(context),
userSettingPage(context),
attentionPage(context),
testMessagePage(context),
likePage(context),
],
),
));
}
base(BuildContext context, VoidCallback callback, String itemName) {
return Container(
margin: EdgeInsets.fromLTRB(16, 16, 16, 0),
child: OutlineButton(
onPressed: callback,
child: Text(itemName),
),
);
}
testMessagePage(BuildContext context) {
return base(context, () {
Navigator.push(
context,
new CustomRoute(RouterCenterImpl()
.findNewMessageRouter()?.getMessagePage(''))
);
}, "消息页面");
}
testReportPage(BuildContext context) {
return base(context, () {
Navigator.push(
context,
new CustomRoute(RouterCenterImpl()
.findActivityReportRouter()
?.getActivityReportPage(300, 1, '')));
}, "报告页面");
}
presigePage(BuildContext context) {
return base(context, () {
Navigator.push(
context,
new CustomRoute(RouterCenterImpl()
.findPrestigeRouter()
?.getReputationsPage(1, "ww", "ww")));
}, "专家声望页面");
}
albumPage(BuildContext context) {
return base(context, () {
Navigator.push(
context,
new CustomRoute(RouterCenterImpl().findAlbumRouter()?.getAlbumPage(
"com.example.gengmei_flutter_plugin_example", true, 1, null)));
}, "相册页面");
}
userSettingPage(BuildContext context) {
return base(context, () {
Navigator.push(
context,
new CustomRoute(RouterCenterImpl()
.findUserRouter()
?.getUserSettingPage("241765462", "NULL")));
}, "设置页面");
}
attentionPage(BuildContext context) {
return base(context, () {
Navigator.push(
context,
new CustomRoute(RouterCenterImpl()
.findNewMessageRouter()?.getAttentionPage('message_home'))
);
}, "通知页面");
}
likePage(BuildContext context) {
return base(context, () {
Navigator.push(
context,
new CustomRoute(RouterCenterImpl()
.findNewMessageRouter()?.getLikePage('message_home'))
);
}, "like页面");
}
}