MediaRule class final
One media rule of a node: patch applies while the screen meets every condition given (minWidth, maxWidth, orientation).
- Annotations
-
- @immutable
Constructors
- MediaRule({Object? minWidth, Object? maxWidth, MediaOrientation? orientation, Json patch = const {}})
-
const
Properties
- conditionText → String
-
The condition as CSS (
(min-width: tablet) and (orientation: portrait)).no setter - hashCode → int
-
The hash code for this object.
no setteroverride
- maxWidth → Object?
-
CSS
max-width: a width in px (inclusive), or a breakpoint name (up to the next breakpoint's min width, exclusive).final - minWidth → Object?
-
CSS
min-width: a width in px (inclusive), or a breakpoint name (from its min width).final - orientation → MediaOrientation?
-
CSS
orientation.final - patch → Json
-
A JSON merge patch over the node (maps merge,
nullremoves, anything else replaces):props,layout,decoration,visible,opacity,motion(a transform that moves what is painted, not the layout:Transform.translate), andbind: bindings that hold at these sizes only ("bind": {"visible": "${= !open}"}), ornullto drop one of the node's own here, so its patched value shows.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
below(
Breakpoints breakpoints) → double? - The width maxWidth admits widths below (exclusive), or null: a number n admits up to n inclusive; a breakpoint name, up to the next breakpoint's min width.
-
holds(
double width, double? height, Breakpoints breakpoints) → bool -
Whether the rule holds on a screen
width×height(a rule naming an unknown breakpoint never holds). -
lowest(
Breakpoints breakpoints) → double? - The lowest width minWidth admits, or null (no bound, or a name that isn't a breakpoint: see unknownNames).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Json -
toString(
) → String -
A string representation of this object.
inherited
-
unknownNames(
Breakpoints breakpoints) → List< String> -
The breakpoint names this rule uses that
breakpointsdoesn't have.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override