ResponsiveValue<T> class

A generic responsive value that changes based on screen size.

Example:

final columns = ResponsiveValue<int>(
  phone: 2,
  tablet: 3,
  desktop: 4,
).value;

Constructors

ResponsiveValue({required T phone, T? tablet, T? desktop})
const

Properties

desktop → T?
final
hashCode int
The hash code for this object.
no setterinherited
phone → T
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tablet → T?
final
value → T
Get value based on current screen size
no setter

Methods

getValue(BuildContext context) → T
Get value based on context
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