AdaptiveSpacing class

Pre-defined adaptive spacing values.

Provides consistent spacing that scales across device types.

Padding(
  padding: EdgeInsets.all(AdaptiveSpacing.md(context)),
  child: MyWidget(),
)

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

gapLg(BuildContext context) SizedBox
Horizontal gap - large
gapMd(BuildContext context) SizedBox
Horizontal gap - medium
gapSm(BuildContext context) SizedBox
Horizontal gap - small
gapVLg(BuildContext context) SizedBox
Vertical gap - large
gapVMd(BuildContext context) SizedBox
Vertical gap - medium
gapVSm(BuildContext context) SizedBox
Vertical gap - small
gapVXs(BuildContext context) SizedBox
Vertical gap - extra small
gapXs(BuildContext context) SizedBox
Horizontal gap - extra small
lg(BuildContext context) double
Large spacing (24/32/40 for phone/tablet/desktop)
md(BuildContext context) double
Medium spacing (16/20/24 for phone/tablet/desktop)
sm(BuildContext context) double
Small spacing (8/12/16 for phone/tablet/desktop)
xl(BuildContext context) double
Extra large spacing (32/48/64 for phone/tablet/desktop)
xs(BuildContext context) double
Extra small spacing (4/6/8 for phone/tablet/desktop)
xxl(BuildContext context) double
Extra extra large spacing (48/64/96 for phone/tablet/desktop)
xxs(BuildContext context) double
Extra extra small spacing (2/3/4 for phone/tablet/desktop)