Skip to content

anisalibegic/separated_row

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SeparatedRow pub package

Flutter package for rendering separated Row children.

Also, give pub package a try!

example.gif

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 separator
  • includeOuterSeparators - Separators are added before the first and after the last element if true

Comparison

Before After
IntrinsicHeight(
  child: Row(
    children:[
      const VerticalDivider(),
      Text("Item 1"),
      const VerticalDivider(),
      Text("Item 2"),
      const VerticalDivider(),
      Text("Item 3"),
      const VerticalDivider(),
      Text("Item 4"),
      const VerticalDivider(),
      Text("Item 5"),
      const VerticalDivider(),
      Text("Item 6"),
      const VerticalDivider(),
      Text("Item 7"),
      const VerticalDivider(),
      Text("Item 8"),
      const VerticalDivider(),
      Text("Item 9"),
      const VerticalDivider(),
      Text("Item 10"),
      const VerticalDivider(),
    ],
  )
)
IntrinsicHeight(
  child: SeparatedRow(
    children: [
      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) => const VerticalDivider(),
  )
)

About

Flutter package for rendering separated Row children.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages