GranularLayout class
A granular set of breakpoints, commonly used in applications that requires a more fine-grained layout.
See also:
- LayoutResolver - the base class used to create any type of layout, like a custom one.
- Inheritance
-
- Object
- LayoutResolver<
GranularBreakpoint> - GranularLayout
Constructors
- GranularLayout(double size, {int xxLarge = 1600, int xLarge = 1200, int large = 769, int medium = 481, int small = 321})
-
Creates a GranularLayout with the respective breakpoint sizes, each representing a Breakpoint instance of
value type
GranularBreakpoint
.
Properties
-
breakpoint
→ Breakpoint<
GranularBreakpoint> -
Current breakpoint created from size
finalinherited
-
breakpoints
→ List<
Breakpoint< GranularBreakpoint> > -
The list of the current available breakpoints, descending ordered
no setterinherited
- breakpointValue → GranularBreakpoint
-
The Breakpoint.value associated with the current breakpoint
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLarge → bool
-
true
if the current breakpointValue exactly matches GranularBreakpoint.largeno setter - isLargeOrLarger → bool
-
true
if the current breakpointValue matches GranularBreakpoint.large or a larger breakpointno setter - isLargeOrSmaller → bool
-
true
if the current breakpointValue matches GranularBreakpoint.large or a smaller breakpointno setter - isMedium → bool
-
true
if the current breakpointValue exactly matches GranularBreakpoint.mediumno setter - isMediumOrLarger → bool
-
true
if the current breakpointValue matches GranularBreakpoint.medium or a larger breakpointno setter - isMediumOrSmaller → bool
-
true
if the current breakpointValue matches GranularBreakpoint.medium or a smaller breakpointno setter - isSmall → bool
-
true
if the current breakpointValue exactly matches GranularBreakpoint.smallno setter - isSmallOrLarger → bool
-
true
if the current breakpointValue matches GranularBreakpoint.small or a larger breakpointno setter - isSmallOrSmaller → bool
-
true
if the current breakpointValue matches GranularBreakpoint.small or a smaller breakpointno setter - isXLarge → bool
-
true
if the current breakpointValue exactly matches GranularBreakpoint.xLargeno setter - isXLargeOrLarger → bool
-
true
if the current breakpointValue matches GranularBreakpoint.xLarge or a larger breakpointno setter - isXLargeOrSmaller → bool
-
true
if the current breakpointValue matches GranularBreakpoint.xLarge or a smaller breakpointno setter - isXSmall → bool
-
true
if the current breakpointValue exactly matches GranularBreakpoint.xSmallno setter - isXXLarge → bool
-
true
if the current breakpointValue exactly matches GranularBreakpoint.xxLargeno 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< GranularBreakpoint, 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(
GranularBreakpoint match) → bool -
true
ifmatch
is equals to breakpointValueinherited -
matchesValueOrLarger(
GranularBreakpoint match) → bool -
true
ifmatch
is associated with a corresponding Breakpoint that is exactly or larger than the current breakpointValueinherited -
matchesValueOrSmaller(
GranularBreakpoint match) → bool -
true
ifmatch
is associated with a corresponding Breakpoint that is exactly or smaller than the current breakpointValueinherited -
maybeValue<
T extends Object> ({T xxLarge()?, T xLarge()?, T large()?, T medium()?, T small()?, T xSmall()?}) → 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 xxLarge()?, T xLarge()?, T large()?, T medium()?, T small()?, T xSmall()?}) → T -
Builds the most suitable
T
depending on the current breakpoint.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited