separated_column 1.0.1+2 separated_column: ^1.0.1+2 copied to clipboard
Flutter package for rendering Column widget that injects the separator in between the children.
SeparatedColumn #
Flutter package for rendering separated Column children. This package is also available on pub.
Also, give separated_row a try!
Usage #
The only difference between SeparatedColumn
and Column
are separatorBuilder
and includeOuterSeparators
properties.
separatorBuilder
- Executed every time when there is a need to inject the separatorincludeOuterSeparators
- Separators are added before the first and after the last element if true
SeparatedColumn(
children: <Widget>[
ListTile(
title: Text("Item 1"),
),
ListTile(
title: Text("Item 2"),
),
ListTile(
title: Text("Item 3"),
),
ListTile(
title: Text("Item 4"),
),
],
separatorBuilder: (BuildContext context, int index) {
return Divider();
},
includeOuterSeparators: true,
)