StreamSpacing class

Spacing primitives for the Stream design system.

Provides consistent spacing values for padding, margins, and gaps between UI elements. Spacing values are the same across all platforms.

{@tool snippet}

To use spacing values:

const spacing = StreamSpacing();
Container(
  padding: EdgeInsets.all(spacing.md),
  child: Column(
    spacing: spacing.xs,
    children: [...],
  ),
);

{@end-tool}

Annotations

Constructors

StreamSpacing({double none = tokens.StreamTokensDimensions.spacingNone, double xxxs = tokens.StreamTokensDimensions.spacingXxxs, double xxs = tokens.StreamTokensDimensions.spacingXxs, double xs = tokens.StreamTokensDimensions.spacingXs, double sm = tokens.StreamTokensDimensions.spacingSm, double md = tokens.StreamTokensDimensions.spacingMd, double lg = tokens.StreamTokensDimensions.spacingLg, double xl = tokens.StreamTokensDimensions.spacingXl, double xxl = tokens.StreamTokensDimensions.spacing2xl, double xxxl = tokens.StreamTokensDimensions.spacing3xl})
Creates a StreamSpacing with the default values.
const

Properties

canMerge → bool
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
lg → double
Large spacing.
final
md → double
Medium spacing.
final
none → double
No spacing.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sm → double
Small spacing.
final
xl → double
Extra large spacing.
final
xs → double
Extra small spacing.
final
xxl → double
Extra extra large spacing.
final
xxs → double
Base unit spacing.
final
xxxl → double
Extra extra extra large spacing.
final
xxxs → double
Extra extra extra small spacing.
final

Methods

copyWith({double? none, double? xxxs, double? xxs, double? xs, double? sm, double? md, double? lg, double? xl, double? xxl, double? xxxl}) → StreamSpacing
inherited
merge(StreamSpacing? other) → StreamSpacing
inherited
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

lerp(StreamSpacing? a, StreamSpacing? b, double t) → StreamSpacing?
Linearly interpolates between two StreamSpacing instances.