CommonLayout class
A set of wide-ranged breakpoints, frequently used in native, web and desktop cross-platform applications
See also:
- LayoutResolver - the base class used to create any type of layout, like a custom one.
- Inheritance
-
- Object
- LayoutResolver<
CommonBreakpoint> - CommonLayout
Constructors
- CommonLayout(double size, {int desktop = 769, int tablet = 481, int phone = 321})
-
Creates a CommonLayout with the specified
desktop
,tablet
andphone
breakpoint sizes, each representing a Breakpoint instance of value typeCommonBreakpoint
.
Properties
-
breakpoint
→ Breakpoint<
CommonBreakpoint> -
Current breakpoint created from size
finalinherited
-
breakpoints
→ List<
Breakpoint< CommonBreakpoint> > -
The list of the current available breakpoints, descending ordered
no setterinherited
- breakpointValue → CommonBreakpoint
-
The Breakpoint.value associated with the current breakpoint
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDesktop → bool
-
true
if the current breakpointValue exactly matches CommonBreakpoint.desktopno setter - isPhone → bool
-
true
if the current breakpointValue exactly matches CommonBreakpoint.phoneno setter - isPhoneOrLarger → bool
-
true
if the current breakpointValue matches CommonBreakpoint.phone or a larger breakpointno setter - isPhoneOrSmaller → bool
-
true
if the current breakpointValue matches CommonBreakpoint.phone or a smaller breakpointno setter - isTablet → bool
-
true
if the current breakpointValue exactly matches CommonBreakpoint.tabletno setter - isTabletOrLarger → bool
-
true
if the current breakpointValue matches CommonBreakpoint.tablet or a larger breakpointno setter - isTabletOrSmaller → bool
-
true
if the current breakpointValue matches CommonBreakpoint.tablet or a smaller breakpointno setter - isTinyHardware → bool
-
true
if the current breakpointValue exactly matches CommonBreakpoint.tinyHardwareno setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → double
-
The reference value to build the current breakpoint
finalinherited
Methods
-
closestValue<
U extends Object> (Map< CommonBreakpoint, U> breakpointsMap) → U -
Finds the closest value to the current breakpoint by applying a custom cascading search in the current list of
available
breakpointsMap
.inherited -
matchesValue(
CommonBreakpoint match) → bool -
true
ifmatch
is equals to breakpointValueinherited -
matchesValueOrLarger(
CommonBreakpoint match) → bool -
true
ifmatch
is associated with a corresponding Breakpoint that is exactly or larger than the current breakpointValueinherited -
matchesValueOrSmaller(
CommonBreakpoint match) → bool -
true
ifmatch
is associated with a corresponding Breakpoint that is exactly or smaller than the current breakpointValueinherited -
maybeValue<
T extends Object> ({T desktop()?, T tablet()?, T phone()?, T tinyHardware()?}) → T? -
Proxies the call to value but allows all arguments to be
null
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
value<
T extends Object> ({T desktop()?, T tablet()?, T phone()?, T tinyHardware()?}) → T -
Builds the most suitable
T
depending on the current breakpoint.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited