divbox 0.1.1 copy "divbox: ^0.1.1" to clipboard
divbox: ^0.1.1 copied to clipboard

A utility widget for padding and margin.

divbox #

A flutter widget that provides margin and padding utilities.
Inspired by ChakraUI styled props

Available arguments: #

  • child => Type: Widget REQUIRED
  • mx, my, px, py => Horizontal(X) and Vertical(Y) padding and margin => Type: double
  • ml, mt, mr, mb, pl, pt, pr, pb => Left, Top, Right, Bottom Margin and Padding => Type: double
  • m, p => Overall Margin and Padding (All 4 sides)

Individual values takes higher precedence over axis value.
Axis values take higher precedence over overall value.

Usage: #

DivBox(
  m: 45.0,
  mr: 80.0,
  mx: 1.0,
  child: DivBox(
    px: 12.0,
    py: 24.0,
    pt: 75.0,
    child: Text(
      'Dart',
      style: TextStyle(
        fontSize: 24.0,
      ),
    ),
  ),
);

See example

1
likes
120
pub points
46%
popularity

Publisher

unverified uploader

A utility widget for padding and margin.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on divbox