AntBreakpoint enum

Defines responsive layout breakpoints following the Ant Design system.

Implements BreakpointSpec so that each value has an associated screen width threshold (breakpoint) used to determine which layout should apply at a given screen width.

These breakpoints align with typical Ant Design breakpoints:

  • xs: <576px
  • sm: ≥576px
  • md: ≥768px
  • lg: ≥992px
  • xl: ≥1200px
  • xxl: ≥1600px

Example:

final current = ResponsiveBreakpointTheme.of<AntBreakpoint>(context);
if (current >= AntBreakpoint.lg) {
  // Render desktop layout
}
Inheritance
Implemented types
Available extensions

Values

xs → const AntBreakpoint

Extra small: <576px

const AntBreakpoint(breakpoint: 0)
sm → const AntBreakpoint

Small: ≥576px

const AntBreakpoint(breakpoint: 576)
md → const AntBreakpoint

Medium: ≥768px

const AntBreakpoint(breakpoint: 768)
lg → const AntBreakpoint

Large: ≥992px

const AntBreakpoint(breakpoint: 992)
xl → const AntBreakpoint

Extra large: ≥1200px

const AntBreakpoint(breakpoint: 1200)
xxl → const AntBreakpoint

Extra extra large: ≥1600px

const AntBreakpoint(breakpoint: 1600)

Properties

breakpoint double
The minimum width (in logical pixels) at which this breakpoint applies.
final
hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
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 <(BreakpointSpec other) bool

Available on BreakpointSpec, provided by the BreakpointComparison extension

Returns true if this breakpoint is less than other.
operator <=(BreakpointSpec other) bool

Available on BreakpointSpec, provided by the BreakpointComparison extension

Returns true if this breakpoint is less than or equal to other.
operator ==(Object other) bool
The equality operator.
inherited
operator >(BreakpointSpec other) bool

Available on BreakpointSpec, provided by the BreakpointComparison extension

Returns true if this breakpoint is greater than other.
operator >=(BreakpointSpec other) bool

Available on BreakpointSpec, provided by the BreakpointComparison extension

Returns true if this breakpoint is greater than or equal to other.

Constants

values → const List<AntBreakpoint>
A constant List of the values in this enum, in order of their declaration.