ContextBreakpointExtensions extension
Extensions that map ContextBreakpoints window-size classes onto BuildContext, based on the Material Design 3 specification.
Reference: https://m3.material.io/foundations/layout/applying-layout/window-size-classes
Example:
if (context.isMobile) { /* compact layout */ }
if (context.isExpanded) { /* side-by-side layout */ }
- on
Properties
- isDesktop → bool
-
Available on BuildContext, provided by the ContextBreakpointExtensions extension
Returns true if the window is large (1200 dp ≤ width < 1600 dp).no setter - isExpanded → bool
-
Available on BuildContext, provided by the ContextBreakpointExtensions extension
Returns true if the window is expanded (840 dp ≤ width < 1200 dp).no setter - isExtraLarge → bool
-
Available on BuildContext, provided by the ContextBreakpointExtensions extension
Returns true if the window is extra-large (width ≥ 1600 dp).no setter - isMobile → bool
-
Available on BuildContext, provided by the ContextBreakpointExtensions extension
Returns true if the window is compact (width < 600 dp).no setter - isTablet → bool
-
Available on BuildContext, provided by the ContextBreakpointExtensions extension
Returns true if the window is medium (600 dp ≤ width < 840 dp).no setter