StyledToastTheme class

Toast theme, only for default content widget.

If you have specified a custom content widget, ToastTheme will not be working.

Inheritance

Constructors

StyledToastTheme({Key? key, required Widget child, TextAlign? textAlign, TextDirection? textDirection, BorderRadius? borderRadius, Color? backgroundColor, EdgeInsets? textPadding, TextStyle? textStyle, ShapeBorder? shapeBorder, Duration? duration, Duration? animDuration, StyledToastPosition? toastPositions, Alignment? alignment, Axis? axis, Offset? startOffset, Offset? endOffset, Offset? reverseStartOffset, Offset? reverseEndOffset, StyledToastAnimation? toastAnimation, StyledToastAnimation? reverseAnimation, Curve? curve, Curve? reverseCurve, bool? dismissOtherOnShow, VoidCallback? onDismiss, bool? fullWidth, bool? isHideKeyboard, CustomAnimationBuilder? animationBuilder, CustomAnimationBuilder? reverseAnimBuilder, bool? isIgnoring, 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
The widget below this widget in the tree.
finalinherited
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
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() InheritedElement
Inflates this configuration to a concrete instance.
inherited
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
updateShouldNotify(covariant InheritedWidget oldWidget) bool
Whether the framework should notify widgets that inherit from this widget.
override

Operators

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

Static Methods

maybeOf(BuildContext context) StyledToastTheme?
Try to find the StyledToastTheme object in the widgets tree.
of(BuildContext context) StyledToastTheme
Get the StyledToastTheme object.