@@ -12,10 +12,11 @@ class Index extends StatefulWidget {
1212 _IndexState createState () => _IndexState (model: this .model);
1313}
1414
15- class _IndexState extends State <Index > {
15+ class _IndexState extends State <Index >{
1616 final MainStateModel model;
1717 List mapList = [];
1818 int index;
19+
1920 _IndexState ({Key key, this .model});
2021
2122 @override
@@ -31,6 +32,9 @@ class _IndexState extends State<Index> {
3132 String nameSpaces = widgetsItem.nameSpaces;
3233 List _tmpWidgetList = widgetsItem.widgetList;
3334 return ExpansionTile (
35+ onExpansionChanged: (isOpen) {
36+ print (isOpen);
37+ },
3438 title: Text (
3539 widgetsItem.typeName,
3640 style: TextStyle (
@@ -40,57 +44,66 @@ class _IndexState extends State<Index> {
4044 ),
4145 leading: Icon (
4246 IconData (
43- widgetsItem.code ?? 58353 ,
47+ widgetsItem.code,
4448 fontFamily: 'MaterialIcons' ,
4549 matchTextDirection: true ,
4650 ),
4751 // color: Color(AppTheme.mainColor),
4852 ),
49- backgroundColor: Colors .white ,
53+ backgroundColor: Colors .grey.shade100. withOpacity ( 0.1 ) ,
5054 children: [
51- GridView .count (
52- shrinkWrap: true ,
53- physics: NeverScrollableScrollPhysics (),
54- childAspectRatio: 1 ,
55- crossAxisCount: 3 ,
56- children: List .generate (
57- _tmpWidgetList.length,
58- (index) {
59- return Container (
60- decoration: BoxDecoration (
61- border: Border (
62- bottom: BorderSide (
63- width: .1 ,
55+ Container (
56+ decoration: BoxDecoration (
57+ color: Colors .grey.shade100,
58+ borderRadius: BorderRadius .all (
59+ Radius .circular (20 ),
60+ ),
61+ ),
62+ child: GridView .count (
63+ shrinkWrap: true ,
64+ physics: NeverScrollableScrollPhysics (),
65+ childAspectRatio: 1 ,
66+ crossAxisCount: 3 ,
67+ children: List .generate (
68+ _tmpWidgetList.length,
69+ (index) {
70+ return Container (
71+ decoration: BoxDecoration (
72+ border: Border (
73+ bottom: BorderSide (
74+ width: .1 ,
75+ ),
6476 ),
6577 ),
66- ),
67- child: Column (
68- mainAxisAlignment: MainAxisAlignment .center,
69- children: [
70- IconButton (
71- iconSize: 48 ,
72- icon: Icon (
73- IconData (
74- _tmpWidgetList[index].code ?? 59101 ,
75- fontFamily: 'MaterialIcons' ,
76- matchTextDirection: true ,
78+ child: Column (
79+ mainAxisAlignment: MainAxisAlignment .center,
80+ children: [
81+ IconButton (
82+ iconSize: 48 ,
83+ icon: Icon (
84+ IconData (
85+ _tmpWidgetList[index].code ?? 59101 ,
86+ fontFamily: 'MaterialIcons' ,
87+ matchTextDirection: true ,
88+ ),
89+ color: Color (AppTheme .mainColor),
7790 ),
78- color: Color (AppTheme .mainColor),
91+ onPressed: () {
92+ FluroRouter .router.navigateTo (
93+ context,
94+ nameSpaces + _tmpWidgetList[index].title,
95+ );
96+ },
7997 ),
80- onPressed: () {
81- FluroRouter .router.navigateTo (
82- context,
83- nameSpaces + _tmpWidgetList[index].title,
84- );
85- },
86- ),
87- Text (
88- _tmpWidgetList[index].title,
89- ),
90- ],
91- ),
92- );
93- },
98+ Text (
99+ _tmpWidgetList[index].title,
100+ overflow: TextOverflow .ellipsis,
101+ ),
102+ ],
103+ ),
104+ );
105+ },
106+ ),
94107 ),
95108 ),
96109 ],
0 commit comments