StyledToast class

Toast configuration widget, which we use to save the overall configuration for toast widget in.

Inheritance

Constructors

StyledToast({Key? key, required Widget child, TextAlign? textAlign, TextDirection? textDirection, BorderRadius? borderRadius, Color? backgroundColor, EdgeInsets? textPadding, TextStyle? textStyle = const TextStyle(fontSize: 16.0, color: Colors.white), ShapeBorder? shapeBorder, Duration? duration, Duration? animDuration, StyledToastPosition? toastPositions, StyledToastAnimation? toastAnimation, StyledToastAnimation? reverseAnimation, Alignment? alignment, Axis? axis, Offset? startOffset, Offset? endOffset, Offset? reverseStartOffset, Offset? reverseEndOffset, Curve? curve, Curve? reverseCurve, bool? dismissOtherOnShow = true, VoidCallback? onDismiss, required Locale locale, bool? fullWidth, bool? isHideKeyboard, CustomAnimationBuilder? animationBuilder, CustomAnimationBuilder? reverseAnimBuilder, bool? isIgnoring = true, OnInitStateCallback? onInitState})
const

Properties

alignment Alignment?
Alignment of animation, like size, rotate animation.
final
animationBuilder CustomAnimationBuilder?
Custom animation builder method.
final
animDuration Duration?
Toast animation duration.
final
axis Axis?
Axis of animation, like size animation.
final
backgroundColor Color?
Background color.
final
borderRadius BorderRadius?
Border radius.
final
child Widget
Child of toast scope.
final
curve Curve?
Animation curve.
final
dismissOtherOnShow bool?
Dismiss old toast when new one shows.
final
duration Duration?
Toast show duration.
final
endOffset Offset?
End offset of slide animation.
final
fullWidth bool?
Full width that the width of the screen minus the width of the margin.
final
hashCode int
The hash code for this object.
no setterinherited
isHideKeyboard bool?
Is hide keyboard when toast show.
final
isIgnoring bool?
Is the input ignored for the toast.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
locale Locale
The locale of the app.
final
onDismiss VoidCallback?
callback when toast dismissed.
final
onInitState → OnInitStateCallback?
When toast widget initState, this callback will be called.
final
reverseAnimation StyledToastAnimation?
Toast reverse animation.
final
reverseAnimBuilder CustomAnimationBuilder?
Custom animation builder method.
final
reverseCurve Curve?
Animation reverse curve.
final
reverseEndOffset Offset?
End offset of reverse slide animation.
final
reverseStartOffset Offset?
Start offset of reverse slide animation.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shapeBorder ShapeBorder?
Shape for the container.
final
startOffset Offset?
Start offset of slide animation.
final
textAlign TextAlign?
Text align.
final
textDirection TextDirection?
Text direction.
final
textPadding EdgeInsets?
Padding for the text and the container edges.
final
textStyle TextStyle?
Text style for content.
final
toastAnimation StyledToastAnimation?
Toast animation.
final
toastPositions StyledToastPosition?
Position of the toast widget in current window.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
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}) 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