ScreenBreakpoints class
ScreenBreakpoints are the control points that tells ResponsiveWrapper to change the DeviceScreen
.
This is an upper or lower limit depends on how it is configured compared with Size.width
.
Also it serves to do comparisons with the Condition class.
SBValue save a value that means Size.width
.
The basic use is,
and for default was set with SBValue.min
ScreenBreakpoints(
mobile: 320,
tablet: 700,
desktop: 1200,
)
Also you can use the constructor ScreenBreakpoints.values
,
to have a bigger control over the SBValue.
ScreenBreakpoints.values(
mobile: const SBValue.max(...),
tablet: const SBValue.max(...),
desktop: const SBValue.inf(),
)
Sugestion: in order to have a consistance in the behaviour of the app
the best is to set the SBValue for a ScreenBreakpoints in all cases by min
or max
,
avoiding mixing the types.
Constructors
- ScreenBreakpoints({required double mobile, required double tablet, required double desktop})
- ScreenBreakpoints.values({required SBValue mobile, required SBValue tablet, required SBValue desktop})
Properties
- desktop → SBValue?
-
Value for desktop
Screen
finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- isMinSBValue → bool
-
no setter
- mobile → SBValue?
-
Value for mobile
Screen
finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tablet → SBValue?
-
Value for tablet
Screen
finalinherited
Methods
-
copyWith(
{SBValue? mobile, SBValue? tablet, SBValue? desktop}) → ScreenBreakpoints -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String - A string representation of this object.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited