SpacingTokens class abstract
============================================================================= DESIGN TOKENS
Centralized design system values for the Neumorphic Component Workbench. These tokens replace magic numbers throughout the codebase to ensure:
- Consistency across all 60+ components
- Single source of truth for design decisions
- Self-documenting code
- Easy global design changes
Usage:
import 'package:sandbox/theme/design_tokens.dart';
double blur = NeumorphicTokens.blurDefault; // Instead of 8.0
double padding = SpacingTokens.lg; // Instead of 16.0
============================================================================= SPACING TOKENS
Based on 4px grid system (4, 8, 12, 16, 20, 24, 32, 40, 48)
Rationale: 4px base allows flexible scaling while maintaining visual rhythm. This aligns with Material Design guidelines and common design tool grids.
Constructors
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
Constants
- huge → const double
- 40px - XXX large (page-level spacing)
- lg → const double
- 16px - Medium (standard padding, section gaps) - MOST COMMON
- massive → const double
- 48px - Maximum standard spacing
- md → const double
- 12px - Medium-small (list item padding, form field spacing)
- sm → const double
- 8px - Small spacing (between related elements, list gaps)
- xl → const double
- 20px - Medium-large (card internal padding)
- xs → const double
- 4px - Minimal spacing (icon gaps, tight layouts)
- xxl → const double
- 24px - Large (section separators, major gaps)
- xxxl → const double
- 32px - Extra large (major section gaps)