Specify how a SnackBar was closed.

The showSnackBar function returns a ScaffoldFeatureController. The value of the controller's closed property is a Future that resolves to a SnackBarClosedReason. Applications that need to know how a snackbar was closed can use this value.

Example:

Scaffold.of(context).showSnackBar(
  new SnackBar( ... )
).closed.then((SnackBarClosedReason reason) {
   ...
});

Constants

action SnackBarClosedReason

The snack bar was closed after the user tapped a SnackBarAction.

const SnackBarClosedReason(0)
hide SnackBarClosedReason

The snack bar was closed by the ScaffoldFeatureController close callback or by calling hideCurrentSnackBar directly.

const SnackBarClosedReason(2)
remove SnackBarClosedReason

The snack bar was closed by an call to removeCurrentSnackBar.

const SnackBarClosedReason(3)
swipe SnackBarClosedReason

The snack bar was closed by a user's swipe.

const SnackBarClosedReason(1)
timeout SnackBarClosedReason

The snack bar was closed because its timer expired.

const SnackBarClosedReason(4)
values List<SnackBarClosedReason>

A constant List of the values in this enum, in order of their declaration.

const List<SnackBarClosedReason>

Properties

index int
read-only
hashCode int

Get a hash code for this object.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

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