ResponsiveValue<T> class
A widget that provides different values based on screen size.
Constructors
- ResponsiveValue({T? extraSmall, T? small, T? medium, T? large, required T defaultValue})
-
Creates a ResponsiveValue.
const
- ResponsiveValue.all(T value)
-
Creates a ResponsiveValue with the same value for all sizes.
const
Properties
- defaultValue → T
-
The default value.
final
- extraSmall → T?
-
Value for extra small screens.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- large → T?
-
Value for large screens.
final
- medium → T?
-
Value for medium screens.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- small → T?
-
Value for small screens.
final
Methods
-
getValue(
ScreenSize screenSize) → T - Gets the value for the given screen size.
-
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