smart_space 0.1.2 copy "smart_space: ^0.1.2" to clipboard
smart_space: ^0.1.2 copied to clipboard

outdated

Ensures a consistent visual rhythm across each screen.

SmartSpace ensures that layouts are visually balanced. Spacings are sized in constant increments, ensuring a consistent visual rhythm across each screen.

8dp-4dp-units

Features #

  • Defines a constant for consistent spacing
  • Automatically apply the spacing to the right axis direction

Getting started #

Define a spacing base

kSpace = yourSpace; // default: 8.0

Usage #

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

Examples #

Column(
  children: [
    ...
    Space(),
    ...
  ],
)
Row(
  children: [
    ...
    Space(),
    ...
  ],
)
ListView(
  children: [
    ...
    Space(),
    ...
  ],
)
ListView.separated(
  itemCount: ...
  separatorBuilder: (_, __) => Space(),
  itemBuilder: ...
)

Additional information #

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.

2
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Ensures a consistent visual rhythm across each screen.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on smart_space