0 purchases
spaced flex
Flutter Spaced Flex #
A Flutter package for easily creating spaced row and column widgets
Usage #
Instead of adding SizedBox widgets between Row and Column widgets every time you add a child to the array, you can now specify a spacing parameter for SpacedRow and SpacedColumn widgets and let this package do the boring job for you.
For example, the code below creates a Row widget and adds SizedBox(width: 16) widgets between the children.
SpacedRow(
spacing: 16,
children: [
Text('Hello'),
Text('World!'),
Text(':)'),
],
);
copied to clipboard
You can also use SpacedFlex widget to easily switch between Row and Column widgets with a simple boolean expression and reverse the display order of the children using the reversed property.
SpacedFlex(
spacing: 16,
direction: someExpression ? Axis.horizontal : Axis.vertical,
reversed: true,
children: [
Text('Hello'),
Text('World!'),
Text(':)'),
],
);
copied to clipboard
Contribution #
So far I couldn't think of any fancy features to add to this package but feel free to contribute or state your opinions through the package's repository.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.