@@ -20,7 +20,6 @@ class ListViewControl extends StatelessWidget {
2020
2121 final ScrollController _controller = ScrollController ();
2222
23- // This is what you're looking for!
2423 void _scrollDown () {
2524 _controller.animateTo (
2625 _controller.position.maxScrollExtent,
@@ -38,6 +37,9 @@ class ListViewControl extends StatelessWidget {
3837 final horizontal = control.attrBool ("horizontal" , false )! ;
3938 final autoScroll = control.attrBool ("autoScroll" , false )! ;
4039 final spacing = control.attrDouble ("spacing" , 0 )! ;
40+ final dividerThickness = control.attrDouble ("dividerThickness" , 0 )! ;
41+ final itemExtent = control.attrDouble ("itemExtent" );
42+ final firstItemPrototype = control.attrBool ("firstItemPrototype" , false )! ;
4143 final padding = parseEdgeInsets (control, "padding" );
4244
4345 List <Control > visibleControls = children.where ((c) => c.isVisible).toList ();
@@ -60,19 +62,28 @@ class ListViewControl extends StatelessWidget {
6062 control, visibleControls[index].id, disabled);
6163 },
6264 separatorBuilder: (context, index) {
63- return Divider (height: spacing);
65+ return horizontal
66+ ? dividerThickness == 0
67+ ? SizedBox (width: spacing)
68+ : VerticalDivider (
69+ width: spacing, thickness: dividerThickness)
70+ : dividerThickness == 0
71+ ? SizedBox (height: spacing)
72+ : Divider (
73+ height: spacing, thickness: dividerThickness);
6474 },
6575 )
6676 : ListView .builder (
6777 controller: _controller,
6878 scrollDirection: horizontal ? Axis .horizontal : Axis .vertical,
6979 padding: padding,
7080 itemCount: children.length,
81+ itemExtent: itemExtent,
7182 itemBuilder: (context, index) {
7283 return createControl (
7384 control, visibleControls[index].id, disabled);
7485 },
75- prototypeItem: children.isNotEmpty
86+ prototypeItem: firstItemPrototype && children.isNotEmpty
7687 ? createControl (control, visibleControls[0 ].id, disabled)
7788 : null ,
7889 ),
0 commit comments