@@ -4,6 +4,7 @@ import 'package:flutter_constraintlayout/flutter_constraintlayout.dart';
4
4
import 'badge.dart' ;
5
5
import 'barrier.dart' ;
6
6
import 'circle_position.dart' ;
7
+ import 'coming_soon.dart' ;
7
8
import 'complex_list.dart' ;
8
9
import 'dimension_ratio.dart' ;
9
10
import 'grid.dart' ;
@@ -34,7 +35,7 @@ class ExampleHome extends StatelessWidget {
34
35
'Vertical List' : const VerticalListExample (),
35
36
'Staggered Grid' : const StaggeredGridExample (),
36
37
'Circle Position' : const CirclePositionExample (),
37
- 'Chain (Coming soon)' : null ,
38
+ 'Chain (Coming soon)' : const ComingSoonWidget () ,
38
39
};
39
40
40
41
@override
@@ -53,32 +54,24 @@ class ExampleHome extends StatelessWidget {
53
54
).applyConstraint (
54
55
topCenterTo: parent,
55
56
),
56
- SingleChildScrollView (
57
- child: Column (
58
- children: [
59
- for (int i = 0 ; i < keyList.length; i++ )
60
- SizedBox (
61
- width: double .infinity,
62
- height: 40 ,
63
- child: TextButton (
64
- onPressed: exampleMap[keyList[i]] == null
65
- ? null
66
- : () {
67
- Navigator .of (context)
68
- .push (MaterialPageRoute (builder: (_) {
69
- return exampleMap[keyList[i]]! ;
70
- }));
71
- },
72
- child: Text (
73
- keyList[i],
74
- style: const TextStyle (
75
- fontSize: 20 ,
76
- ),
77
- ),
78
- ),
79
- )
80
- ],
81
- ),
57
+ ListView .builder (
58
+ itemBuilder: (_, index) {
59
+ return TextButton (
60
+ onPressed: () {
61
+ Navigator .of (context).push (MaterialPageRoute (builder: (_) {
62
+ return exampleMap[keyList[index]]! ;
63
+ }));
64
+ },
65
+ child: Text (
66
+ keyList[index],
67
+ style: const TextStyle (
68
+ fontSize: 20 ,
69
+ ),
70
+ ),
71
+ );
72
+ },
73
+ itemCount: keyList.length,
74
+ itemExtent: 40 ,
82
75
).applyConstraint (
83
76
width: matchParent,
84
77
height: matchConstraint,
0 commit comments