showSnackBar method

void showSnackBar({
  1. String? message,
})

Show SnackBar UI

Implementation

void showSnackBar({String? message}) {
  assert(
      _appNavigatorKey != null, "Must set appNavigator before show dialog");

  if (snackBarOverlayEntry != null) {
    hideSnackBar();
  }
  snackBarOverlayEntry = _buildSnackBarOverlayEntry(
    primaryColors: _primaryColor,
    backgroundColor: _backgroundColor,
    labelColor: _labelColor,
    style: _style,
    message: message,
  );
  _appNavigatorKey?.currentState?.overlay?.insert(snackBarOverlayEntry!);
}