negativeButton

inline fun AlertDialog.Builder.negativeButton(text: String = "CANCEL", crossinline handleClick: (i: Int) -> Unit = {})

Helper method to create negative button for Alert dialog and listen to the button's click

Parameters

text

Positive Button Text, Defaults to "CANCEL"

handleClick

Callback that works as click listener when negative button is clicked