TUISnackBar constructor

TUISnackBar({
  1. Key? key,
  2. required BuildContext context,
  3. TUISnackBarType type = TUISnackBarType.information,
  4. required String message,
  5. TUISnackBarAction? action,
  6. Duration? duration,
  7. VoidCallback? onVisible,
})

Implementation

TUISnackBar({
  super.key,
  required BuildContext context,
  TUISnackBarType type = TUISnackBarType.information,
  required String message,
  TUISnackBarAction? action,
  Duration? duration,
  super.onVisible,
}) : super(
          elevation: 0,
          duration: duration ?? const Duration(seconds: 4),
          backgroundColor:
              type._getBackgroundColor(TUITheme.of(context).colors),
          behavior: SnackBarBehavior.floating,
          content: _getWidget(context, type, message, action),
          shape: const StadiumBorder());