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
}
on

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 >(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.