showToast method

void showToast(
  1. String message
)

Implementation

void showToast(String message) {
  _toast.text = message;
  _toast.classes.toggle('toast--on');
  Future.delayed(const Duration(seconds: 3)).then((_) {
    _toast.classes.toggle('toast--on');
  });
}