AntdToast class
@t 轻提示 @g 反馈 @o 66 @d 对操作结果的轻量级反馈,无需用户操作即可自行消失。 @u 适用于页面内容的变化不能直接反应操作结果时使用。
- Inheritance
- Mixed-in types
Constructors
-
AntdToast.new({Key? key, AntdToastStyle? style, AntdStyleBuilder<
AntdToastStyle, AntdToast> ? styleBuilder, VoidCallback? onClosed, VoidCallback? onOpened, VoidCallback? onMaskTap, AntdMaskBuilder<AntdToastState> ? builder, AntdMaskOpacity? opacity = AntdMaskOpacity.transparent, bool? dismissOnMaskTap = true, bool? showMask = false, Duration? duration = const Duration(milliseconds: 2000), AntdIcon? icon, AntdToastPosition? position, bool dismissOnTap = true, AntdToastType? type, AntdToastAnimation? animation}) -
const
Properties
- animation → AntdToastAnimation?
-
自定义动画
final
-
builder
→ AntdMaskBuilder<
AntdToastState> ? -
内容
finalinherited
- dismissOnMaskTap → bool?
-
点击背景板是否关闭,mask为true才有效
finalinherited
- dismissOnTap → bool
-
当触摸的时候关闭
final
- duration → Duration?
-
提示持续时间,若为 0 则不会自动关闭
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hole → AntdMaskHole?
-
镂空的区域
finalinherited
- icon → AntdIcon?
-
Toast 图标
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- layerType → String
-
no setteroverride
- onClosed → VoidCallback?
-
完全关闭后触发
finalinherited
- onMaskTap → VoidCallback?
-
点击蒙层自身触发,mask为true才有效
finalinherited
- onOpened → VoidCallback?
-
完全展示后触发
finalinherited
- opacity → AntdMaskOpacity?
-
透明度,mask为true才有效
finalinherited
- position → AntdToastPosition?
-
垂直方向显示位置
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showMask → bool?
-
是否显示背景蒙版
finalinherited
- style → AntdToastStyle?
-
样式
finalinherited
-
styleBuilder
→ AntdStyleBuilder<
AntdToastStyle, AntdToast> ? -
动态样式
finalinherited
- type → AntdToastType?
-
toast的类型
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
-
getDefaultStyle(
BuildContext context, AntdTheme theme, AntdMapToken token) → AntdToastStyle -
override
-
getFinalStyle(
BuildContext context, AntdToastStyle style, AntdMapToken token) → AntdToastStyle -
inherited
-
getInputStyle(
BuildContext context) → AntdToastStyle? -
inherited
-
getStyle(
BuildContext context) → AntdToastStyle -
inherited
-
getStyleBuilder(
BuildContext context) → AntdStyleBuilder< AntdToastStyle, AntdToast> ? -
inherited
-
getThemeStyle(
BuildContext context, AntdTheme theme) → AntdStyleBuilder< AntdToastStyle, AntdToast> ? -
override
-
getWidget(
BuildContext context) → AntdToast -
override
-
margeStyle(
AntdToastStyle defaultStyle, AntdToastStyle? style) → AntdToastStyle -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
open<
T> () → Future< T?> -
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