TransientKey<T> class

The OverlaySupportEntry associated with TransientKey will be dismiss immediately when next OverlaySupportEntry showing by showOverlay with the same key.

This key was designed for toast, but it seems wired, so have not use yet.

For example:


final key = const TransientKey('transient');

showSimpleNotification(Text('modal example'), key: modalKey);

// The previous notification will be dismiss immediately, instead of have
// a disappearing animation effect.
showSimpleNotification(Text('modal example 2'), key: modalKey);

Inheritance

Constructors

TransientKey(T value)
const

Properties

hashCode int
The hash code for this object. [...]
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
value → T
The value to which this key delegates its operator==
final, inherited

Methods

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 ==(Object other) bool
The equality operator. [...]
override