TUISnackBar constructor
TUISnackBar({
- Key? key,
- required BuildContext context,
- TUISnackBarType type = TUISnackBarType.information,
- required String message,
- TUISnackBarAction? action,
- Duration? duration,
- 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());