showMessage method

void showMessage(
  1. String message, {
  2. SnackBarAction? action,
  3. bool? hideCurrent,
})

Shows a SnackBar with the given message. Override this method to customize the SnackBar.

Implementation

void showMessage(
  String message, {
  SnackBarAction? action,
  bool? hideCurrent,
}) {
  if (hideCurrent ?? this.hideCurrent) {
    _key.currentState?.hideCurrentSnackBar();
  }
  _key.currentState?.showSnackBar(
    SnackBar(
      content: Text(message),
      action: action,
    ),
  );
}