BreakpointComparison extension
Extension that adds comparison operators to BreakpointSpec.
Allows using relational operators (>
, <
, <=
, >=
) directly
on objects that implement BreakpointSpec, based on their breakpoint value.
Example:
if (Breakpoint.sm > Breakpoint.xs) {
// do something
}
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 >(
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
.