Spacing class
Utility class for consistent spacing throughout the application.
This class provides:
- Spacing constants (xs, sm, md, lg, xl, xxl, huge)
- SizedBox helper methods
- EdgeInsets helper methods
- Predefined spacing widgets
All methods are static and the class cannot be instantiated.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Static Methods
-
all(
double value) → EdgeInsets - Returns EdgeInsets with all sides equal
-
box(
{double? width, double? height}) → Widget - Returns a SizedBox with both width and height
-
horizontal(
double width) → Widget - Returns a SizedBox with the specified width
-
horizontalPadding(
double value) → EdgeInsets - Returns EdgeInsets with horizontal padding only
-
only(
{double? top, double? bottom, double? left, double? right}) → EdgeInsets - Returns EdgeInsets with only specified sides
-
square(
double size) → Widget - Returns a square SizedBox
-
symmetric(
{double? horizontal, double? vertical}) → EdgeInsets - Returns EdgeInsets with symmetric horizontal and vertical
-
vertical(
double height) → SizedBox - Returns a SizedBox with the specified height
-
verticalPadding(
double value) → EdgeInsets - Returns EdgeInsets with vertical padding only
Constants
- horizontalLg → const Widget
- Large horizontal spacing
- horizontalMd → const Widget
- Medium horizontal spacing
- horizontalSm → const Widget
- Small horizontal spacing
- horizontalXl → const Widget
- Extra large horizontal spacing
- horizontalXs → const Widget
- Extra small horizontal spacing
- horizontalXxl → const Widget
- Extra extra large horizontal spacing
- huge → const double
- Huge spacing (64.0)
- lg → const double
- Large spacing (24.0)
- md → const double
- Medium spacing (16.0)
- sm → const double
- Small spacing (8.0)
- verticalLg → const Widget
- Large vertical spacing
- verticalMd → const Widget
- Medium vertical spacing
- verticalSm → const Widget
- Small vertical spacing
- verticalXl → const Widget
- Extra large vertical spacing
- verticalXs → const Widget
- Extra small vertical spacing
- verticalXxl → const Widget
- Extra extra large vertical spacing
- xl → const double
- Extra large spacing (32.0)
- xs → const double
- Extra small spacing (4.0)
- xxl → const double
- Extra extra large spacing (48.0)