showToast

fun Context.showToast(message: String, duration: Int = Toast.LENGTH_SHORT)

Shows a toast message with the given message and duration.

Parameters

message

The message to be displayed in the toast.

duration

The duration of the toast. Can be either Toast.LENGTH_SHORT or Toast.LENGTH_LONG.