GrantUiState

data class GrantUiState(val isVisible: Boolean = false, val showRationale: Boolean = false, val showSettingsGuide: Boolean = false, val rationaleMessage: String? = null, val settingsMessage: String? = null)

UI State for grant dialogs.

This state drives the UI layer to show appropriate dialogs:

  • Rationale dialog when grant was denied softly

  • Settings guide dialog when grant is permanently denied

Constructors

Link copied to clipboard
constructor(isVisible: Boolean = false, showRationale: Boolean = false, showSettingsGuide: Boolean = false, rationaleMessage: String? = null, settingsMessage: String? = null)

Properties

Link copied to clipboard
val isVisible: Boolean = false

Whether any grant dialog should be visible

Link copied to clipboard

Optional custom message for rationale

Link copied to clipboard
val settingsMessage: String? = null

Optional custom message for settings guide

Link copied to clipboard
val showRationale: Boolean = false

Show rationale dialog (when user denied once, explain why we need it)

Link copied to clipboard

Show settings guide (when permanently denied, must go to Settings)