LayoutResolver<T> class abstract

Resolves a list of Breakpoint for a specific size, providing responsive layout utilities.

For commonly used implementations, see:

  • CommonLayout - a wide-ranged breakpoints that are frequently used in native, web and desktop cross-platform applications;
  • GranularLayout - a more granular set of breakpoints, recommended when there are many different layout "behaviors".

Note: even though you can pass a list of breakpoints that have the same Breakpoint.value, it's not recommended because the logic might get really confusing, given what the LayoutResolver API proposes to do.

Implementers
Annotations

Constructors

LayoutResolver({required double size, required List<Breakpoint<T>> breakpoints})

Properties

breakpoint Breakpoint<T>
Current breakpoint created from size
final
breakpoints List<Breakpoint<T>>
The list of the current available breakpoints, descending ordered
no setter
breakpointValue → T
The Breakpoint.value associated with the current breakpoint
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size double
The reference value to build the current breakpoint
final

Methods

closestValue<U extends Object>(Map<T, U> breakpointsMap) → U
Finds the closest value to the current breakpoint by applying a custom cascading search in the current list of available breakpointsMap.
matchesValue(T match) bool
true if match is equals to breakpointValue
matchesValueOrLarger(T match) bool
true if match is associated with a corresponding Breakpoint that is exactly or larger than the current breakpointValue
matchesValueOrSmaller(T match) bool
true if match is associated with a corresponding Breakpoint that is exactly or smaller than the current breakpointValue
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited