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 = 0, double xxxs = 2, double xxs = 4, double xs = 8, double sm = 12, double md = 16, double lg = 20, double xl = 24, double xxl = 32, double xxxl = 40})
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.