CustomSnackBar class

Popup widget that you can use by default to show some information

Inheritance

Constructors

CustomSnackBar.error({Key? key, required String message, EdgeInsetsGeometry messagePadding = const EdgeInsets.symmetric(horizontal: 24), Widget icon = const Icon(Icons.error_outline, color: Color(0x15000000), size: 120), TextStyle textStyle = const TextStyle(fontWeight: FontWeight.w600, fontSize: 16, color: Colors.white), int maxLines = 2, int iconRotationAngle = 32, double iconPositionTop = -10, double iconPositionLeft = -8, Color backgroundColor = const Color(0xffff5252), List<BoxShadow> boxShadow = kDefaultBoxShadow, BorderRadius borderRadius = kDefaultBorderRadius, double textScaleFactor = 1.0, TextAlign textAlign = TextAlign.center})
const
CustomSnackBar.info({Key? key, required String message, EdgeInsetsGeometry messagePadding = const EdgeInsets.symmetric(horizontal: 24), Widget icon = const Icon(Icons.sentiment_neutral, color: Color(0x15000000), size: 120), TextStyle textStyle = const TextStyle(fontWeight: FontWeight.w600, fontSize: 16, color: Colors.white), int maxLines = 2, int iconRotationAngle = 32, double iconPositionTop = -10, double iconPositionLeft = -8, Color backgroundColor = const Color(0xff2196F3), List<BoxShadow> boxShadow = kDefaultBoxShadow, BorderRadius borderRadius = kDefaultBorderRadius, double textScaleFactor = 1.0, TextAlign textAlign = TextAlign.center})
const
CustomSnackBar.success({Key? key, required String message, EdgeInsetsGeometry messagePadding = const EdgeInsets.symmetric(horizontal: 24), Widget icon = const Icon(Icons.sentiment_very_satisfied, color: Color(0x15000000), size: 120), TextStyle textStyle = const TextStyle(fontWeight: FontWeight.w600, fontSize: 16, color: Colors.white), int maxLines = 2, int iconRotationAngle = 32, double iconPositionTop = -10, double iconPositionLeft = -8, Color backgroundColor = const Color(0xff00E676), List<BoxShadow> boxShadow = kDefaultBoxShadow, BorderRadius borderRadius = kDefaultBorderRadius, double textScaleFactor = 1.0, TextAlign textAlign = TextAlign.center})
const

Properties

backgroundColor → Color
final
borderRadius → BorderRadius
final
boxShadow → List<BoxShadow>
final
hashCode → int
The hash code for this object.
no setterinherited
icon → Widget
final
iconPositionLeft → double
final
iconPositionTop → double
final
iconRotationAngle → int
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxLines → int
final
message → String
final
messagePadding → EdgeInsetsGeometry
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
textAlign → TextAlign
final
textScaleFactor → double
final
textStyle → TextStyle
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → CustomSnackBarState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

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