Adaptation<T> class

Defines a customized theme for components with an adaptive factory constructor.

Currently, only Switch.adaptive supports this class.

Constructors

Adaptation()
Creates an Adaptation.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type Type
The adaptation's type.
no setter

Methods

adapt(ThemeData theme, T defaultValue) → T
Typically, this is overridden to return an instance of a custom component ThemeData class, like SwitchThemeData, instead of the defaultValue.
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