SpacingTheme class

A theme extension that defines spacing values for different sizes. Can be used to maintain consistent spacing throughout the app. Overwrite by providing custom values in the constructor.

Inheritance

Constructors

SpacingTheme({double xs = 4.0, double sm = 8.0, double md = 16.0, double lg = 32.0, double xl = 64.0})
The standard spacing theme with default values.
const
SpacingTheme.custom({required double xs, required double sm, required double md, required double lg, required double xl})
Creates a custom spacing theme with the given values.
const
SpacingTheme.spacious({double xs = 8.0, double sm = 16.0, double md = 32.0, double lg = 64.0, double xl = 128.0})
A more spacious spacing theme. Provides larger default spacing values compared to the standard SpacingTheme.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
lg → double
Large spacing value. Defaults to 32.0.
final
md → double
Medium spacing value. Defaults to 16.0.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sm → double
Small spacing value. Defaults to 8.0.
final
type → Object
The extension's type.
no setterinherited
xl → double
Extra large spacing value. Defaults to 64.0.
final
xs → double
Extra small spacing value. Defaults to 4.0.
final

Methods

copyWith({double? xs, double? sm, double? md, double? lg, double? xl}) → SpacingTheme
Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.
override
lerp(covariant ThemeExtension<SpacingTheme>? other, double t) → SpacingTheme
Linearly interpolate with another ThemeExtension object.
override
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