Skip to content

Commit

Permalink
Merge pull request #5 from arpitkatiyar1999/v2.0.1
Browse files Browse the repository at this point in the history
fixed NoSuchMethodError for BasicAlertDialog
  • Loading branch information
arpitkatiyar1999 authored Dec 24, 2024
2 parents 013f754 + 6eb9546 commit bea4594
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
3 changes: 1 addition & 2 deletions CountryPicker/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ android {
dependencies {
implementation(libs.androidx.core.ktx)
//compose
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.material3)
implementation(libs.androidx.material3.library)
// google phone number
implementation(libs.libPhoneNumber)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.Clear
import androidx.compose.material.icons.filled.Search
import androidx.compose.material3.BasicAlertDialog
import androidx.compose.material3.CenterAlignedTopAppBar
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
Expand Down Expand Up @@ -42,6 +41,7 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.withStyle
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import com.arpitkatiyarprojects.countrypicker.models.CountriesListDialogDisplayProperties
import com.arpitkatiyarprojects.countrypicker.models.CountryDetails
Expand Down Expand Up @@ -72,9 +72,7 @@ internal fun CountrySelectionDialog(
var isSearchEnabled by remember { mutableStateOf(false) }
var filteredCountries by remember { mutableStateOf(countriesList) }
val coroutineScope = rememberCoroutineScope()
BasicAlertDialog(
modifier = Modifier
.fillMaxSize(),
Dialog(
onDismissRequest = onDismissRequest,
properties = properties,
content = {
Expand Down Expand Up @@ -196,7 +194,6 @@ internal fun CountrySelectionDialog(
)
}


/**
* Composable function that displays a list item for a country in the country selection dialog.
* The list item shows the country flag, country name, country code (optional), and country phone code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ fun CountryPickerWithOutlinedText() {
modifier = Modifier
.fillMaxWidth()
.padding(16.dp),
mobileNumber = CountryPickerUtils.getFormattedMobileNumber(
enteredMobileNumber, selectedCountryState?.countryCode ?: "IN",
),
mobileNumber = enteredMobileNumber,
onMobileNumberChange = {
enteredMobileNumber = it
isMobileNumberValidationError = !CountryPickerUtils.isMobileNumberValid(
Expand Down
8 changes: 5 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
[versions]
agp = "8.5.0"
agp = "8.5.2"
kotlin = "1.9.22"
coreKtx = "1.12.0"
junit = "4.13.2"
junitVersion = "1.2.1"
espressoCore = "3.5.1"
lifecycleRuntimeKtx = "2.7.0"
activityCompose = "1.8.2"
composeBom = "2024.02.02"
composeBom = "2024.12.01"
composeCompilerVersion = "1.5.10"
libPhoneNumber = "8.13.33"
kotlinxSerialization = "1.9.0"
kotlinxSerializationJson = "1.6.3"
navigationCompose = "2.8.3"
material3Library = "1.2.1"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
Expand All @@ -30,6 +31,7 @@ androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-toolin
androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
androidx-material3-library = { group = "androidx.compose.material3", name = "material3", version.ref = "material3Library" }
libPhoneNumber = { module = "com.googlecode.libphonenumber:libphonenumber", version.ref = "libPhoneNumber" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }

Expand All @@ -39,6 +41,6 @@ kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serializa
androidApplication = { id = "com.android.application", version.ref = "agp" }
jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
androidLibrary = { id = "com.android.library", version.ref = "agp" }
jetbrainsKotlinSerialization = { id ="org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlinxSerialization"}
jetbrainsKotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlinxSerialization" }


0 comments on commit bea4594

Please sign in to comment.