Spacing class

Represents spacing properties such as padding and margin in CSS.

Prefer using Padding and Margin type aliases for better readability.

Constructors

Spacing.all(Unit value)
Creates spacing with the same value for all directions.
const
factory
Spacing.fromLTRB(Unit left, Unit top, Unit right, Unit bottom)
Creates spacing with individual values for left, top, right, and bottom.
const
factory
Spacing.only({Unit? left, Unit? top, Unit? right, Unit? bottom})
Creates spacing with optional values for left, top, right, and bottom.
const
factory
Spacing.symmetric({Unit? vertical, Unit? horizontal})
Creates symmetric spacing with optional vertical and horizontal values.
const
factory

Properties

bottom Unit
no setter
hashCode int
The hash code for this object.
no setterinherited
left Unit
no setter
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
styles Map<String, String>
The css styles
final
top Unit
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

inherit → const Spacing
initial → const Spacing
revert → const Spacing
revertLayer → const Spacing
unset → const Spacing
zero → const Spacing
Creates spacing with zero value for all directions.