separated_column 3.0.3 copy "separated_column: ^3.0.3" to clipboard
separated_column: ^3.0.3 copied to clipboard

Flutter package for rendering Column widget that injects the separator in between the children.

SeparatedColumn pub package #

Flutter package for rendering separated Column children.

Also, give pub package a try!

example.gif

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 separator
  • includeOuterSeparators - Separators are added before the first and after the last element if true
SeparatedColumn(
  children: <Widget>[
    Text("Item 1"),
    Text("Item 2"),
    Text("Item 3"),
    Text("Item 4"),
    Text("Item 5"),
    Text("Item 6"),
    Text("Item 7"),
    Text("Item 8"),
    Text("Item 9"),
    Text("Item 10"),
  ],
  includeOuterSeparators: true,
  separatorBuilder: (BuildContext context, int index) => Divider(),
)

Which is an equivalent of:

Column(
  children: <Widget>[
    Divider(),
    Text("Item 1"),
    Divider(),
    Text("Item 2"),
    Divider(),
    Text("Item 3"),
    Divider(),
    Text("Item 4"),
    Divider(),
    Text("Item 5"),
    Divider(),
    Text("Item 6"),
    Divider(),
    Text("Item 7"),
    Divider(),
    Text("Item 8"),
    Divider(),
    Text("Item 9"),
    Divider(),
    Text("Item 10"),
    Divider(),
  ],
)
16
likes
140
pub points
90%
popularity
screenshot

Publisher

verified publisheremaq.ba

Flutter package for rendering Column widget that injects the separator in between the children.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on separated_column