Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
data class KwikCountryInfo(val name: String, val code: KwikCountry, val dialingCode: String, @DrawableRes val flag: Int, val tags: List<String> = listOf())
Link copied to clipboard
class KwikNetworkUtils(context: Context, coroutineScope: CoroutineScope = CoroutineScope(Dispatchers.Default))

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
tailrec fun Context.activity(): Activity
Link copied to clipboard
Link copied to clipboard

Utility function to get the country code of the device based on the network country ISO This function uses the TelephonyManager to get the network country ISO and returns the corresponding KwikCountry, which is an ISO 3166-1 alpha-2 code.

Link copied to clipboard
fun Context.isPermissionGranted(vararg permission: String): Boolean
Link copied to clipboard
fun resolveCountries(includeOnly: List<KwikCountry> = listOf(), omit: List<KwikCountry> = listOf()): List<KwikCountryInfo>

Allows you to filter the list of countries by including only the countries you want Note that includeOnly takes precedence over omit

Link copied to clipboard
fun LocalDate.toFormat(format: String = "MMM dd", locale: Locale = Locale.ENGLISH): String
fun OffsetDateTime.toFormat(format: String = "MMM dd", locale: Locale = Locale.ENGLISH): String
Link copied to clipboard
Link copied to clipboard
fun LocalDate.toMillis(zoneId: ZoneId = ZoneId.systemDefault()): Long