BootstrapBreakpoint enum
Defines breakpoints based on the Bootstrap 5 responsive layout system.
Each breakpoint corresponds to a minimum screen width in logical pixels, and is used to adapt the UI layout responsively across different devices.
Implements BreakpointSpec so it can be used with utilities like ResponsiveBreakpointTheme.
Breakpoint Ranges (Bootstrap 5):
xs
: <576px (extra small)sm
: ≥576px (small)md
: ≥768px (medium)lg
: ≥992px (large)xl
: ≥1200px (extra large)xxl
: ≥1400px (extra extra large)
Example:
final current = ResponsiveBreakpointTheme.of<BootstrapBreakpoint>(context);
if (current >= BootstrapBreakpoint.lg) {
// Render desktop layout
}
- Inheritance
- Implemented types
- Available extensions
Values
- xs → const BootstrapBreakpoint
-
Extra small: less than 576px.
const BootstrapBreakpoint(breakpoint: 0)
- sm → const BootstrapBreakpoint
-
Small: 576px and up.
const BootstrapBreakpoint(breakpoint: 576)
- md → const BootstrapBreakpoint
-
Medium: 768px and up.
const BootstrapBreakpoint(breakpoint: 768)
- lg → const BootstrapBreakpoint
-
Large: 992px and up.
const BootstrapBreakpoint(breakpoint: 992)
- xl → const BootstrapBreakpoint
-
Extra large: 1200px and up.
const BootstrapBreakpoint(breakpoint: 1200)
- xxl → const BootstrapBreakpoint
-
Extra extra large: 1400px and up.
const BootstrapBreakpoint(breakpoint: 1400)
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
Returnstrue
if this breakpoint is less thanother
. -
operator <=(
BreakpointSpec other) → bool -
Available on BreakpointSpec, provided by the BreakpointComparison extension
Returnstrue
if 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
Returnstrue
if this breakpoint is greater thanother
. -
operator >=(
BreakpointSpec other) → bool -
Available on BreakpointSpec, provided by the BreakpointComparison extension
Returnstrue
if this breakpoint is greater than or equal toother
.
Constants
-
values
→ const List<
BootstrapBreakpoint> - A constant List of the values in this enum, in order of their declaration.