Mode<T> class

The current mode of the application. Either the Brightness.dark or Brightness.light. See also:

Constructors

Mode({required BuildContext context, required T light, T? dark})
const

Properties

context BuildContext
final
dark → T?
final
hashCode int
The hash code for this object.
no setterinherited
light → T
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T
no setter

Methods

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

Static Methods

all<T>({required BuildContext context, required T value}) → T
only<T>({required BuildContext context, required T light, required T? dark}) → T
Returns a Mode with the same value but with the given context.