showToast
Requires:
BaseKit≥2.0.1@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
Method signature
showToast(params: )Minimum SDK versions
- iOS
ThingSmartBaseKitBizBundle - ≥ 5.2.1
- Android
com.thingclips.smart:thingsmart-bizbundle-basekit - ≥ 5.2.0
Description
Show a toast message
Parameters
| Property | Type | Required | Default | Description | Minimum SDK versions |
|---|---|---|---|---|---|
title | string | Yes | - | Message content | — |
icon | string | No | "success" | Icon: 'success' / 'error' / 'loading' / 'none' | — |
image | string | No | - | Local path to a custom icon; image has higher priority than icon | — |
duration | number | No | 1500 | Delay for the message (iOS only) | — |
mask | boolean | No | false | Whether to show a transparent mask to prevent touch-through | — |
complete | () => void | No | - | Completion callback (executed on both success and failure) | — |
success | () => void | No | - | Callback on successful API call | — |
fail | (params: Object) => void | No | - | Failure callback | — |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None