timeout
@CheckReturnValue
Sets the timeout for this modal, invalidating the modal after expiration, and running the given timeout handler.
If unset, the timeout is set to Modals.defaultTimeout.
Return
This builder for chaining convenience
Parameters
timeout
The amount of time in the supplied time unit before the modal is removed
unit
The time unit of the timeout
on Timeout
The function to run when the timeout has been reached
abstract fun timeout(timeout: Duration, onTimeout: suspend () -> Unit? = null): ModalBuilder(source)
Sets the timeout for this modal, invalidating the modal after expiration, and running the given timeout handler.
If unset, the timeout is set to Modals.defaultTimeout.
Return
This builder for chaining convenience
Parameters
timeout
The amount of time before the modal is removed
on Timeout
The function to run when the timeout has been reached