ToastOptions class

Inheritance

Constructors

ToastOptions({Color? color, GestureTapCallback? onToastTap, Duration duration = const Duration(milliseconds: 1500), FlAnimationStyle? animationStyle, Axis? direction, ToastBuilder? builder, Duration? animationDuration, EdgeInsetsGeometry? padding, Color? backgroundColor, Color? foregroundColor, AlignmentGeometry? alignment, GestureTapCallback? onModalTap, double gaussian = 0, bool? ignoring, bool? absorbing, double? elevation, Color? shadowColor, TextStyle? textStyle, BorderRadiusGeometry? borderRadius, bool? borderOnForeground, ShapeBorder? shape, BoxConstraints? constraints, bool safeLTRB = true, bool resizeToAvoidBottomInset = true, Curve insetAnimationCurve = Curves.decelerate, Duration insetAnimationDuration = const Duration(milliseconds: 100)})
const
ToastOptions.extended({Color? color = const Color(0xFFFFFFFF), GestureTapCallback? onToastTap, Duration duration = const Duration(milliseconds: 1500), FlAnimationStyle? animationStyle, Duration? animationDuration = const Duration(milliseconds: 300), Axis? direction = Axis.vertical, ToastBuilder? builder, EdgeInsetsGeometry? padding = const EdgeInsets.all(10), BoxConstraints? constraints, Color? backgroundColor, Color? foregroundColor = const Color(0xFF000000), AlignmentGeometry? alignment = Alignment.center, GestureTapCallback? onModalTap, double gaussian = 0, bool? ignoring, bool? absorbing, double? elevation, Color? shadowColor, TextStyle? textStyle = const TextStyle(color: Color(0xFFFFFFFF)), BorderRadiusGeometry? borderRadius = const BorderRadius.all(Radius.circular(4)), ShapeBorder? shape, bool? borderOnForeground, bool safeLTRB = true, bool resizeToAvoidBottomInset = true, Curve insetAnimationCurve = Curves.decelerate, Duration insetAnimationDuration = const Duration(milliseconds: 100)})
const

Properties

absorbing bool?
是否吸收子组件的点击事件且不响应背景点击事件 默认 false onTap != null 时 无效
finalinherited
alignment AlignmentGeometry?
modal上的组件对齐方式 alignment
finalinherited
animationDuration Duration?
final
animationStyle FlAnimationStyle?
动画样式
final
backgroundColor Color?
背景色
finalinherited
borderOnForeground bool?
finalinherited
borderRadius BorderRadiusGeometry?
finalinherited
builder ToastBuilder?
builder
final
color Color?
字体颜色和icon颜色
final
constraints BoxConstraints?
constraints
finalinherited
direction Axis?
Toast icon direction
final
duration Duration
Toast显示时间
final
elevation double?
finalinherited
foregroundColor Color?
前景色
finalinherited
gaussian double
高斯模糊
finalinherited
hashCode int
The hash code for this object.
no setterinherited
ignoring bool?
是否忽略子组件点击事件响应背景点击事件 默认 false
finalinherited
insetAnimationCurve Curve
当键盘弹出时 modal 顶起 动画 Curve
finalinherited
insetAnimationDuration Duration
当键盘弹出时 modal 顶起 动画 Duration
finalinherited
onModalTap GestureTapCallback?
Modal背景点击事件
finalinherited
onToastTap GestureTapCallback?
Toast onTap
final
padding EdgeInsetsGeometry?
padding
final
resizeToAvoidBottomInset bool
resizeToAvoidBottomInset
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
safeLTRB bool
SafeArea
finalinherited
shadowColor Color?
finalinherited
shape ShapeBorder?
finalinherited
textStyle TextStyle?
Material 属性
finalinherited
type MaterialType?
finalinherited

Methods

copyWith({BoxConstraints? constraints, GestureTapCallback? onToastTap, TextStyle? textStyle, Duration? duration, Color? color, Axis? direction, ToastBuilder? builder, GestureTapCallback? onModalTap, Color? backgroundColor, Color? foregroundColor, double? gaussian, bool? ignoring, bool? absorbing, AlignmentGeometry? alignment, FlAnimationStyle? animationStyle, Duration? animationDuration, double? elevation, Color? shadowColor, ShapeBorder? shape, bool? borderOnForeground, BorderRadiusGeometry? borderRadius, bool? safeLTRB, bool? resizeToAvoidBottomInset, Duration? insetAnimationDuration, Curve? insetAnimationCurve}) ToastOptions
merge([ToastOptions? options]) ToastOptions
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