Skip to Content
ActionsstopTimer

stopTimer

stopTimer action allows developers to halt or pause a running timer within the app, providing control over time-sensitive processes and facilitating efficient handling of time-related events, enhancing user interactions and application behavior.

Properties

PropertyTypeDescription
idstringStop the timer with this ID if it is running

Example

Joke: body: Column: styles: { gap: 10 } children: - Text: text: Click the button to show a Chuck Norris joke every 10 seconds. Click Stop when you have enough. - Row: styles: { gap: 10 } children: - Button: label: Tell me a joke onTap: startTimer: id: jokeTimer options: isGlobal: true repeat: true repeatInterval: 10 startAfter: 0 onTimer: invokeAPI: name: jokeAPI onResponse: |- //@code output.text = response.body.value; - Button: label: Stop onTap: stopTimer: id: jokeTimer - Text: id: output

see the complete example here  to understand usage

Last updated on