FormFactor enum
Device form factor class per Material 3 window-size taxonomy.
Derived from the logical window width; hosts may override it with a FormFactorScope to honour per-app / global view-mode pins or to flag off-axis embedded chrome (industrial HMI, vehicle IVI).
Values
- compact → const FormFactor
-
< 600logical px. Phones, split panes, small popouts. - medium → const FormFactor
-
600 – 839logical px. Tablet portrait, foldables. - expanded → const FormFactor
-
840 – 1199logical px. Desktop, tablet landscape. - large → const FormFactor
-
1200 – 1599logical px. Large monitors. - extraLarge → const FormFactor
-
≥ 1600logical px. Extra-large monitors, TVs, dashboard walls. - embedded → const FormFactor
-
Off-axis embedded chrome (industrial HMI, vehicle IVI). Not picked up from window width — hosts inject this via FormFactorScope.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- isCompactOrMedium → bool
-
True when the form factor is one of the compact / medium classes —
the standard threshold at which single-column layouts apply.
no setter
- isExpandedOrLarger → bool
-
True when the form factor is one of the expanded / large / extra-
large classes — the threshold at which multi-column / rail-based
layouts apply.
no setter
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - 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
Static Methods
-
fromWidth(
double width) → FormFactor - Classify a logical-pixel window width into one of the five width-based classes. FormFactor.embedded is never returned — hosts tag that explicitly.
-
of(
BuildContext context) → FormFactor -
Resolve the effective form factor for
context. Honours any FormFactorScope above the widget; otherwise falls back toMediaQuery.sizeOf(context).width.
Constants
- compactMax → const double
- Upper bound (exclusive) for each class in logical pixels.
- expandedMax → const double
- largeMax → const double
- mediumMax → const double
-
values
→ const List<
FormFactor> - A constant List of the values in this enum, in order of their declaration.