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: <576pxsm: ≥576pxmd: ≥768pxlg: ≥992pxxl: ≥1200pxxxl: ≥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
Returnstrueif this breakpoint is less thanother. -
operator <=(
BreakpointSpec other) → bool -
Available on BreakpointSpec, provided by the BreakpointComparison extension
Returnstrueif this breakpoint is less than or equal toother. -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator >(
BreakpointSpec other) → bool -
Available on BreakpointSpec, provided by the BreakpointComparison extension
Returnstrueif this breakpoint is greater thanother. -
operator >=(
BreakpointSpec other) → bool -
Available on BreakpointSpec, provided by the BreakpointComparison extension
Returnstrueif this breakpoint is greater than or equal toother.
Constants
-
values
→ const List<
AntBreakpoint> - A constant List of the values in this enum, in order of their declaration.