CustomSnackBarTheme class

This can be used to provide additional theme information for CustomSnackBar.

This is not a replacement to SnackBarThemeData. But this provide additional control over the CustomSnackBar. Note that values from this will override the values in SnackBarThemeData.

For the settings that are not present here, please take a look at the SnackBarThemeData and set the appropriate values in the default theme of the Flutter application.

Constructors

CustomSnackBarTheme({Duration defaultDuration = const Duration(minutes: 5), bool showDefaultAction = true, TextStyle? textStyle, int maxLines = 2, Color loadingSnackBarColor = const Color(0xFF81C784), Duration loadingSnackBarDuration = const Duration(minutes: 3), TextStyle? loadingSnackBarTextStyle, Color errorSnackBarColor = const Color(0xFFE57373), Duration errorSnackBarDuration = const Duration(seconds: 10), TextStyle? errorSnackBarTextStyle})
This can be used to provide additional theme information for CustomSnackBar.

Properties

defaultDuration Duration
Default duration that a SnackBar is shown.
final
errorSnackBarColor Color
Background color of the error snack bar. If null, this will use the background color from SnackBarThemeData.
final
errorSnackBarDuration Duration
Duration that the error snack bar is shown. If null, this will use defaultDuration.
final
errorSnackBarTextStyle TextStyle?
Text style of the error snack bar. If null, this will use the textStyle
final
hashCode int
The hash code for this object.
no setterinherited
loadingSnackBarColor Color
Background color of the loading snack bar. If null, this will use the background color from SnackBarThemeData.
final
loadingSnackBarDuration Duration
Duration that the loading snack bar is shown. If null, this will use defaultDuration.
final
loadingSnackBarTextStyle TextStyle?
Text style of the loading snack bar. If null, this will use the textStyle
final
maxLines int
Maximum number of lines that the text shown in the CustomSnackBar can have.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showDefaultAction bool
Show a SnackBar action button with CLEAR as it's text that can be used to hide the SnackBar.
final
textStyle TextStyle?
TextStyle that is used with the text that is showing in the CustomSnackBar.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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