const
SnackBar(- {Key? key,
- required Widget content,
- Color? backgroundColor,
- double? elevation,
- EdgeInsets? margin,
- EdgeInsets? padding,
- double? width,
- ShapeBorder? shape,
- SnackBarBehavior? behavior,
- SnackBarAction? action,
- bool? showCloseIcon,
- Color? closeIconColor,
- @Default(Duration(milliseconds: 4000)) Duration duration,
- Callback? onVisible,
- @Default(DismissDirection.down) DismissDirection dismissDirection,
- @Default(Clip.hardEdge) Clip clipBehavior}
)
Implementation
const factory SnackBar({
Key? key,
required Widget content,
Color? backgroundColor,
double? elevation,
EdgeInsets? margin,
EdgeInsets? padding,
double? width,
ShapeBorder? shape,
SnackBarBehavior? behavior,
SnackBarAction? action,
bool? showCloseIcon,
Color? closeIconColor,
@Default(Duration(milliseconds: 4000)) Duration duration,
Callback? onVisible,
@Default(DismissDirection.down) DismissDirection dismissDirection,
@Default(Clip.hardEdge) Clip clipBehavior,
}) = _SnackBar;