@@ -6,6 +6,7 @@ import 'package:gsy_github_app_flutter/common/net/interceptors/log_interceptor.d
66import 'package:gsy_github_app_flutter/common/style/gsy_style.dart' ;
77import 'package:gsy_github_app_flutter/test/demo_tab_page.dart' ;
88
9+ import '../../common/style/gsy_style.dart' ;
910import '../error_page.dart' ;
1011
1112///请求数据调
@@ -22,11 +23,7 @@ class _DebugDataPageState extends State<DebugDataPage> {
2223 return new Tab (
2324 child: new Column (
2425 mainAxisAlignment: MainAxisAlignment .center,
25- children: < Widget > [
26- new Text (text,
27- style: new TextStyle (
28- fontSize: 12 , fontWeight: FontWeight .bold))
29- ],
26+ children: < Widget > [new Text (text, style: new TextStyle (fontSize: 11 ))],
3027 ),
3128 );
3229 }
@@ -58,7 +55,6 @@ class _DebugDataPageState extends State<DebugDataPage> {
5855 ],
5956 indicatorColor: GSYColors .primaryValue,
6057 onTap: (index) {
61- print ("FFFFFFFFFFFFF" );
6258 setState (() {
6359 tabIndex = index;
6460 });
@@ -89,70 +85,98 @@ class _DebugDataListState extends State<DebugDataList>
8985 color: GSYColors .white,
9086 child: ListView .builder (
9187 physics: const AlwaysScrollableScrollPhysics (),
92- itemBuilder: (context, index) => InkWell (
93- child: Card (
94- child: Container (
95- padding: EdgeInsets .symmetric (vertical: 10 , horizontal: 5 ),
96- child: new Text (
97- widget.titles[index] ?? "" ,
98- style: TextStyle (fontSize: 15 ),
88+ itemBuilder: (context, i) {
89+ var index = widget.dataList.length - i - 1 ;
90+ return InkWell (
91+ child: Card (
92+ child: Row (
93+ children: < Widget > [
94+ new Container (
95+ alignment: Alignment .center,
96+ margin: EdgeInsets .only (right: 5 ),
97+ height: 24 ,
98+ width: 24 ,
99+ decoration: BoxDecoration (
100+ color: GSYColors .primaryValue,
101+ borderRadius: BorderRadius .all (
102+ Radius .circular (12 ),
103+ ),
104+ ),
105+ child: new Text (
106+ index.toString (),
107+ style: TextStyle (
108+ fontSize: 15 ,
109+ color: Colors .white.withAlpha (200 ),
110+ ),
111+ ),
112+ ),
113+ new Expanded (
114+ child: Container (
115+ padding: EdgeInsets .symmetric (vertical: 10 , horizontal: 5 ),
116+ child: new Text (
117+ widget.titles[index] ?? "" ,
118+ style: TextStyle (fontSize: 15 ),
119+ ),
120+ ))
121+ ],
99122 ),
100123 ),
101- ),
102- onLongPress: () {
103- try {
104- Clipboard .setData (
105- new ClipboardData (text: "${widget .titles [index ]}" ));
106- Fluttertoast .showToast (msg: "复制链接成功" );
107- } catch (e) {
108- print (e);
109- }
110- },
111- onDoubleTap: () {
112- try {
113- Clipboard .setData (
114- new ClipboardData (text: "${widget .dataList [index ]}" ));
115- Fluttertoast .showToast (msg: "复制数据成功" );
116- } catch (e) {
117- print (e);
118- }
119- },
120- onTap: () {
121- showBottomSheet (
122- context: context,
123- builder: (context) {
124- return Material (
125- color: Colors .transparent,
126- child: new Stack (
127- children: < Widget > [
128- new Container (
129- padding: EdgeInsets .only (top: 30 ),
130- color: Colors .white,
131- child: SingleChildScrollView (
132- child: JsonViewerWidget (widget.dataList[index])),
133- ),
134- Transform .translate (
135- offset: Offset (0 , - 10 ),
136- child: new Container (
137- alignment: Alignment .topCenter,
138- child: IconButton (
139- icon: Icon (
140- Icons .arrow_drop_down,
141- size: 30 ,
142- color: Colors .black,
124+ onLongPress: () {
125+ try {
126+ Clipboard .setData (
127+ new ClipboardData (text: "${widget .titles [index ]}" ));
128+ Fluttertoast .showToast (msg: "复制链接成功" );
129+ } catch (e) {
130+ print (e);
131+ }
132+ },
133+ onDoubleTap: () {
134+ try {
135+ Clipboard .setData (
136+ new ClipboardData (text: "${widget .dataList [index ]}" ));
137+ Fluttertoast .showToast (msg: "复制数据成功" );
138+ } catch (e) {
139+ print (e);
140+ }
141+ },
142+ onTap: () {
143+ showBottomSheet (
144+ context: context,
145+ builder: (context) {
146+ return Material (
147+ color: Colors .transparent,
148+ child: new Stack (
149+ children: < Widget > [
150+ new Container (
151+ padding: EdgeInsets .only (top: 30 ),
152+ color: Colors .white,
153+ child: SingleChildScrollView (
154+ child:
155+ JsonViewerWidget (widget.dataList[index])),
156+ ),
157+ Transform .translate (
158+ offset: Offset (0 , - 10 ),
159+ child: new Container (
160+ alignment: Alignment .topCenter,
161+ child: IconButton (
162+ icon: Icon (
163+ Icons .arrow_drop_down,
164+ size: 30 ,
165+ color: Colors .black,
166+ ),
167+ onPressed: () {
168+ Navigator .of (context).pop ();
169+ },
143170 ),
144- onPressed: () {
145- Navigator .of (context).pop ();
146- },
147171 ),
148172 ),
149- ) ,
150- ] ,
151- ),
152- );
153- });
154- },
155- ) ,
173+ ] ,
174+ ) ,
175+ );
176+ } );
177+ },
178+ );
179+ } ,
156180 itemCount: widget.titles.length,
157181 ),
158182 );
0 commit comments