SuperResponsive<T> class
A value that varies across the three SuperDeviceModes.
The canonical way the design system keeps a single responsive definition in one place while still exposing all three configurations:
const gutter = SuperResponsive<double>(mobile: 16, tablet: 24, desktop: 32);
gutter.resolve(SuperDeviceMode.tablet); // 24
gutter.desktop; // 32 — all three stay reachable
- Annotations
Constructors
- SuperResponsive({required T mobile, required T tablet, required T desktop})
-
const
- SuperResponsive.all(T value)
-
A SuperResponsive whose value is identical across all three modes.
const
Properties
Methods
-
map<
R> (R f(T value)) → SuperResponsive< R> -
Returns a new SuperResponsive with each value mapped through
f. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
SuperDeviceMode mode) → T -
The value for
mode— the "active" configuration. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override