EdgeInsets
Padding and margin specification
Padding and margins. Uniform, symmetric, or one side at a time.
Properties
topNumberTop inset
leadingNumberLeading (left) inset
bottomNumberBottom inset
trailingNumberTrailing (right) inset
Methods
EdgeInsets.symmetric(horizontal?, vertical?)EdgeInsets ›Symmetric horizontal and vertical insets.
- horizontal Number
- vertical Number
EdgeInsets.only(options)EdgeInsets ›Individual side insets: { top, leading, bottom, trailing }. left and right are accepted too.
- options Any required
- top Number
Points.
- leading Number
Points.
leftalso works. - bottom Number
Points.
- trailing Number
Points.
rightalso works.
- top Number
EdgeInsets.zero()EdgeInsets ›Zero insets on all sides.
Examples
Padding examples
const pad = EdgeInsets.all(16);
const hv = EdgeInsets.symmetric({
horizontal: 20, vertical: 10
});
const custom = EdgeInsets.only({
top: 8, bottom: 16
});