MaterialStateProperty<T> class

Interface for classes that can return a value of type T based on a set of MaterialStates.

For example, MaterialStateColor implements MaterialStateProperty<Color> because it has a resolve method that returns a different Color depending on the given set of MaterialStates.

Implementers

Constructors

MaterialStateProperty()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

resolve(Set<MaterialState> states) → T
Returns a different value of type T depending on the given states. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Static Methods

resolveAs<T>(T value, Set<MaterialState> states) → T
Returns the value resolved in the given set of states if value is a MaterialStateProperty, otherwise returns the value itself. [...]
resolveWith<T>(MaterialPropertyResolver<T> callback) MaterialStateProperty<T>
Convenience method for creating a MaterialStateProperty from a MaterialPropertyResolver function alone.