separated_row 1.1.0-nullsafety.0
separated_row: ^1.1.0-nullsafety.0 copied to clipboard
Flutter package for rendering Row widget that injects the separator in between the children.
SeparatedRow #
Flutter package for rendering separated Row children. This package is also available on pub.
Also, give separated_column a try!
Usage #
The only difference between SeparatedRow
and Row
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
SeparatedRow(
children: <Widget>[
IconButton(
onPressed: () {},
icon: Icon(Icons.favorite),
),
IconButton(
onPressed: () {},
icon: Icon(Icons.favorite_border),
),
IconButton(
onPressed: () {},
icon: Icon(Icons.check),
),
IconButton(
onPressed: () {},
icon: Icon(Icons.close),
),
],
separatorBuilder: (BuildContext context, int index) {
return Container(
width: 1.0,
height: 15.0,
color: Colors.grey,
);
},
includeOuterSeparators: false,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
)