easy_sizebox 0.0.1 copy "easy_sizebox: ^0.0.1" to clipboard
easy_sizebox: ^0.0.1 copied to clipboard

easy sizebox for spacing

Flutter widgets that make it simple to add spaces between Flex widgets, like rows and columns or scrolling views.

Overview We have several choices when it comes to adding white space between widgets inside of a column or row:

One option is to add padding around these widgets, but it would be extremely wordy. Alternately, we might place SizedBox widgets in between. Another choice is EasySizebox. Similar to SizedBox, but it doesn't require you to know if an element is inside a row or a column. in order to avoid being as verbose as employing a SizedBox.

Getting started #

import 'package:easy_sizebox/easy_sizebox.dart';

Then you just have to add a Gap inside a Column with the specified extent.

return Column(
  children: [
    Container(color: Colors.red, height: 20),
    const EasySizebox(gap: 20), // Adds an empty space of 20 pixels.
    Container(color: Colors.red, height: 20),
  ],
);

Then you just have to add a Gap inside a Row with the specified extent.

return Row(
  children: [
    Container(color: Colors.red, height: 20),
    const EasySizebox(gap: 20, axix: 'x'), // Adds an empty space of 20 pixels in row.
    Container(color: Colors.red, height: 20),
  ],
);
3
likes
130
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

easy sizebox for spacing

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on easy_sizebox