SmartSpace ensures that layouts are visually balanced. Spacings are sized in constant increments, ensuring a consistent visual rhythm across each screen.
- Defines a constant for consistent spacing
- Automatically apply the spacing to the right axis direction
Define a spacing base
kSpace = yourSpace; // default: 8.0
Use kSpace as a constant for spacings
Padding(
padding: EdgeInsets.symmetric(
horizontal: kSpace * 2,
vertical: kSpace,
),
child: ...
)
Use Space on Flex and ScrollView children
Space(multiplier) // creates a space of kSpace * multiplier
Column(
children: [
...
Space(),
...
],
)
Row(
children: [
...
Space(),
...
],
)
ListView(
children: [
...
Space(),
...
],
)
ListView.separated(
itemCount: ...
separatorBuilder: (_, __) => Space(),
itemBuilder: ...
)
If you notice any bugs not present in issues, please file a new issue. If you are willing to fix or enhance things yourself, your are very welcome to make a pull request.