SmartConfigToast class
showToast() global config
showToast() 全局配置
Constructors
-
SmartConfigToast({Alignment alignment = Alignment.bottomCenter, SmartAnimationType animationType = SmartAnimationType.fade, Duration animationTime = const Duration(milliseconds: 200), bool useAnimation = true, bool usePenetrate = true, Color maskColor = const Color.fromRGBO(0, 0, 0, 0.46), Widget? maskWidget, bool clickMaskDismiss = false, bool debounce = false, Duration debounceTime = const Duration(milliseconds: 300), SmartToastType displayType = SmartToastType.normal, bool consumeEvent = false, Duration displayTime = const Duration(milliseconds: 2000), Duration intervalTime = const Duration(milliseconds: 100), SmartAwaitOverType awaitOverType = SmartAwaitOverType.dialogDismiss, SmartMaskTriggerType maskTriggerType = SmartMaskTriggerType.up, List<
SmartNonAnimationType> nonAnimationTypes = const [], bool isExist = false})
Properties
- alignment → Alignment
-
control the location of the dialog on the screen
final
- animationTime → Duration
-
animationTime:The animation time can be set
final
- animationType → SmartAnimationType
-
Animation type animationType:For details, please refer to the SmartAnimationType comment
final
- awaitOverType → SmartAwaitOverType
-
The type of dialog await ending
final
- clickMaskDismiss → bool
-
true(dialog will be closed after click background),false(not close)
final
- consumeEvent → bool
-
true (toast will consume touch events), false (toast no longer consumes events, touch events can penetrate toast)
final
- debounce → bool
-
debounce feature,it works on toast and dialog:default(false);
final
- debounceTime → Duration
-
debounceTime:Within the debounce time, multiple clicks will only respond to the first time,
and the second invalid click will trigger the debounce time to re-time.
note: The definition of anti-shake is that the response will not be triggered again at the specified time,
which will cause a delay in the click response, so the actual implementation needs to be adjusted a little.
final
- displayTime → Duration
-
toast display time on the screen
final
- displayType → SmartToastType
-
provider multiple display logic,please refer to SmartToastType comment for detailed description
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- intervalTime → Duration
-
Multi toasts are displayed continuously, and the interval time between each toast is displayed
final
- isExist ↔ bool
-
whether toast(showToast()) exist on the screen
getter/setter pair
- maskColor → Color
-
the color of the mask,it is invalid if usePenetrate is true or maskWidget set the value
final
- maskTriggerType → SmartMaskTriggerType
-
When the mask is clicked, the trigger timing type (please refer to the SmartMaskTriggerType note for details)
final
- maskWidget → Widget?
-
highly customizable mask, it is invalid if usePenetrate is true
final
-
nonAnimationTypes
→ List<
SmartNonAnimationType> -
For different scenes, the pop-up animation can be dynamically closed.
For details, please refer to
SmartNonAnimationType
final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- useAnimation → bool
-
true(use the animation),false(not use)
final
- usePenetrate → bool
-
On-screen interaction events can penetrate the masked background:
true(click event will penetrate background),false(not penetration)
final
Methods
-
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