MessageSnackbarListener constructor
const
MessageSnackbarListener({
- Key? key,
- required Widget child,
- required ProviderBase provider,
- String? errorExtractor(
- dynamic
- String? infoExtractor(
- dynamic
- void onError(
- String error
- void onErrorTap()?,
- String errorActionLabel = 'Segnala',
- Color errorActionLabelColor = Colors.white,
- Color errorBackgroundColor = Colors.red,
- Widget errorLeading = const Icon(Icons.error, color: Colors.white),
- void onInfo(
- String info
- void onInfoTap()?,
- String infoActionLabel = 'Info',
- Color infoActionLabelColor = Colors.white,
- Color infoBackgroundColor = Colors.lightBlue,
- Widget infoLeading = const Icon(Icons.info, color: Colors.white),
- Duration snackBarDisplayTime = const Duration(milliseconds: 4000),
Implementation
const MessageSnackbarListener(
{Key? key,
required this.child,
required this.provider,
this.errorExtractor,
this.infoExtractor,
this.onError,
this.onErrorTap,
this.errorActionLabel = 'Segnala',
this.errorActionLabelColor = Colors.white,
this.errorBackgroundColor = Colors.red,
this.errorLeading = const Icon(Icons.error, color: Colors.white),
this.onInfo,
this.onInfoTap,
this.infoActionLabel = 'Info',
this.infoActionLabelColor = Colors.white,
this.infoBackgroundColor = Colors.lightBlue,
this.infoLeading = const Icon(Icons.info, color: Colors.white),
this.snackBarDisplayTime = const Duration(milliseconds: 4000)})
: super(key: key);