MessageSnackbarListener constructor

const MessageSnackbarListener({
  1. Key? key,
  2. required Widget child,
  3. required ProviderBase provider,
  4. String? errorExtractor(
    1. dynamic
    )?,
  5. String? infoExtractor(
    1. dynamic
    )?,
  6. void onError(
    1. String error
    )?,
  7. void onErrorTap()?,
  8. String errorActionLabel = 'Segnala',
  9. Color errorActionLabelColor = Colors.white,
  10. Color errorBackgroundColor = Colors.red,
  11. Widget errorLeading = const Icon(Icons.error, color: Colors.white),
  12. void onInfo(
    1. String info
    )?,
  13. void onInfoTap()?,
  14. String infoActionLabel = 'Info',
  15. Color infoActionLabelColor = Colors.white,
  16. Color infoBackgroundColor = Colors.lightBlue,
  17. Widget infoLeading = const Icon(Icons.info, color: Colors.white),
  18. 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);