SnackBar constructor

const SnackBar(
  1. {Key key,
  2. @required Widget content,
  3. Color backgroundColor,
  4. double elevation,
  5. ShapeBorder shape,
  6. SnackBarBehavior behavior,
  7. SnackBarAction action,
  8. Duration duration: _snackBarDisplayDuration,
  9. Animation<double> animation,
  10. VoidCallback onVisible}
)

Creates a snack bar.

The content argument must be non-null. The elevation must be null or non-negative.

Implementation

const SnackBar({
  Key key,
  @required this.content,
  this.backgroundColor,
  this.elevation,
  this.shape,
  this.behavior,
  this.action,
  this.duration = _snackBarDisplayDuration,
  this.animation,
  this.onVisible,
}) : assert(elevation == null || elevation >= 0.0),
     assert(content != null),
     assert(duration != null),
     super(key: key);