SnackbarHandler class Null safety

Handler which displays error report as snack bar.

Inheritance

Constructors

SnackbarHandler(Duration duration, {Color? backgroundColor, double? elevation, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, double? width, ShapeBorder? shape, SnackBarBehavior? behavior, SnackBarAction? action, Animation<double>? animation, VoidCallback? onVisible, String? customMessage, TextStyle? textStyle, bool printLogs = false})

Properties

action SnackBarAction?
See SnackBar docs for details.
final
animation Animation<double>?
See SnackBar docs for details.
final
backgroundColor Color?
See SnackBar docs for details.
final
behavior SnackBarBehavior?
See SnackBar docs for details.
final
customMessage String?
Custom message which can be displayed instead default one.
final
duration Duration
See SnackBar docs for details.
final
elevation double?
See SnackBar docs for details.
final
hashCode int
The hash code for this object. [...]
read-only, inherited
localizationOptions LocalizationOptions
Get currently used localization options
read-only, inherited
logger CatcherLogger
Logger instance
read / write, inherited
margin EdgeInsetsGeometry?
See SnackBar docs for details.
final
onVisible VoidCallback?
See SnackBar docs for details.
final
padding EdgeInsetsGeometry?
See SnackBar docs for details.
final
printLogs bool
Enable additional logs printing
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
shape ShapeBorder?
See SnackBar docs for details.
final
textStyle TextStyle?
Custom text style for text displayed within snackbar.
final
width double?
See SnackBar docs for details.
final

Methods

getSupportedPlatforms() List<PlatformType>
Get list of supported platforms
override
handle(Report error, BuildContext? context) Future<bool>
Handle report. If there's scaffold messenger in provided context, then snackbar will be shown.
override
isContextRequired() bool
Check if given report mode requires context to run
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
setLocalizationOptions(LocalizationOptions? localizationOptions) → void
Set localization options (translations) to this report mode
inherited
shouldHandleWhenRejected() bool
Check whether report mode should auto confirm without user confirmation.
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited