Breakpoints class

The minimum widths (in logical pixels) at which each named breakpoint becomes active.

Defaults follow common web conventions. Override any threshold via copyWith or by supplying a custom instance to ThemeData:

ThemeData.light().copyWith(
  breakpoints: const Breakpoints(md: 900, lg: 1200),
)

Constructors

Breakpoints({double sm = 640, double md = 768, double lg = 1024, double xl = 1280, double xxl = 1536})
Creates a breakpoints configuration.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
lg double
Minimum width for Breakpoint.lg (default 1024 px).
final
md double
Minimum width for Breakpoint.md (default 768 px).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sm double
Minimum width for Breakpoint.sm (default 640 px).
final
xl double
Minimum width for Breakpoint.xl (default 1280 px).
final
xxl double
Minimum width for Breakpoint.xxl (default 1536 px).
final

Methods

copyWith({double? sm, double? md, double? lg, double? xl, double? xxl}) Breakpoints
Returns a copy with the given thresholds replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(double width) Breakpoint
Returns the active Breakpoint for the given width.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited