Toast constructor

Toast({
  1. String? id,
  2. Widget? child,
  3. Duration? lifeTime,
  4. Widget transitionBuilder(
    1. Animation<double>,
    2. Widget child,
    3. bool isRemoving
    )?,
  5. String? title,
  6. String? description,
  7. Widget? leading,
  8. double? width,
  9. Duration duration = const Duration(milliseconds: 300),
})

Implementation

Toast({
  this.id,
  Widget? child,
  this.lifeTime,
  this.transitionBuilder,
  this.title,
  this.description,
  this.leading,
  this.width,
  this.duration = const Duration(milliseconds: 300),
}) : assert(!((title == null || description == null) && child == null)) {
  if (child == null) {
    _child = DefaultToast(toast: this);
  } else {
    _child = child;
  }
}