Closed esDotDev closed 4 years ago
I will keep this open for now until i have investigated the possibilities!
Its easy to implement
children: spacer == null
? children
: children.expand((child) => [child, seperator]).toList(),
Will add it in the next release!
Oh nice, that's way cleaner than my implementation! Thanks!
(Only thing is, we don't really want it on the end, easy enough to add padding to the start/end as needed)
Do you mean:
Widget(),
Seperator(),
Widget(),
Seperator (), // remove this
That should be added. Easy to just pop the last element with .removeLast()
.
Yes exactly, from usage, that is almost always what I want to do. We can easily tack on some padding to the start and end with .padding() and it's more readable as well.
This mimics ListView.separated() as well: https://api.flutter.dev/flutter/widgets/ListView/ListView.separated.html
added in v. 0.2.1
Would it be possible to add a separator builder, so we can do something like: