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

Constructors

CommonLayout(double size, {int desktop = 769, int tablet = 481, int phone = 321})
Creates a CommonLayout with the specified desktop, tablet and phone breakpoint sizes, each representing a Breakpoint instance of value type CommonBreakpoint.

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.desktop
no setter
isPhone → bool
true if the current breakpointValue exactly matches CommonBreakpoint.phone
no setter
isPhoneOrLarger → bool
true if the current breakpointValue matches CommonBreakpoint.phone or a larger breakpoint
no setter
isPhoneOrSmaller → bool
true if the current breakpointValue matches CommonBreakpoint.phone or a smaller breakpoint
no setter
isTablet → bool
true if the current breakpointValue exactly matches CommonBreakpoint.tablet
no setter
isTabletOrLarger → bool
true if the current breakpointValue matches CommonBreakpoint.tablet or a larger breakpoint
no setter
isTabletOrSmaller → bool
true if the current breakpointValue matches CommonBreakpoint.tablet or a smaller breakpoint
no setter
isTinyHardware → bool
true if the current breakpointValue exactly matches CommonBreakpoint.tinyHardware
no 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 if match is equals to breakpointValue
inherited
matchesValueOrLarger(CommonBreakpoint match) → bool
true if match is associated with a corresponding Breakpoint that is exactly or larger than the current breakpointValue
inherited
matchesValueOrSmaller(CommonBreakpoint match) → bool
true if match is associated with a corresponding Breakpoint that is exactly or smaller than the current breakpointValue
inherited
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