ToastDuration class Null safety

Class for managing duration of showing Toast

Constructors

ToastDuration(int duration, [int? value])
Initialize a custom Toast duration
const

Properties

duration int
Duration value in milliseconds
final
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
value int?
Value tag for native internally use duration
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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 Properties

values List<ToastDuration>
Return a list of predefined ToastDuration value
read-only

Constants

long → const ToastDuration
Show a Toast using short 3.5 seconds duration
const ToastDuration(3500, 1)
short → const ToastDuration
Show a Toast using short 2 seconds duration
const ToastDuration(2000, 0)