GeolocatorResult

sealed interface GeolocatorResult

Represents the result of a geolocation operation.

Inheritors

Types

Link copied to clipboard

Represents a unsuccessful geolocation operation.

Link copied to clipboard

Geocoding operation failed at some point while geolocation.

Link copied to clipboard

Geocoding failed because the geocoder was unable to get a result for the input.

Link copied to clipboard

Geocoding operation failed because the device does not support geolocation, or the device does not support the specific geolocation operation.

Link copied to clipboard

Geocoding operation failed because the user denied the permission.

Link copied to clipboard

Geocoding operation failed because of a permission error.

Link copied to clipboard
class Success(val data: Location) : GeolocatorResult

Represents a successful geolocation operation.

Properties

Link copied to clipboard
open val isError: Boolean

Check if the result was unsuccessful.

Functions

Link copied to clipboard

Get the error or null if the result was successful.

Link copied to clipboard
open fun getOrNull(): Location?

Get the result list data or null if the result was unsuccessful.

Link copied to clipboard

Perform an action if the result was unsuccessful.

Link copied to clipboard
open fun onSuccess(block: (Location) -> Unit): GeolocatorResult

Perform an action if the result was successful.