Skip to content

Commit

Permalink
V2.0.26
Browse files Browse the repository at this point in the history
Merge pull request #159 from Daniel-Ioannou/v2.0.26
Close: #143  Close:#144
  • Loading branch information
Daniel-Ioannou committed May 12, 2024
2 parents 6481aec + 2aa14a2 commit c735d27
Show file tree
Hide file tree
Showing 65 changed files with 2,065 additions and 148 deletions.
27 changes: 21 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## 2.0.26
* Fix Turkish localization
* Add `moveAlongWithKeyboard`: An optionalargument can be used to move bottomSheet along with keyboard when textfield is focused. It could be useful when bottomSheet height is smaller than half of the screen. Otherwise it shouldn't be set. It has a default value of false.
```Dart
showCountryPicker(
context: context,
moveAlongWithKeyboard: true,
countryListTheme: CountryListThemeData(
bottomSheetHeight: 500,
),
onSelect: (Country country) => print('Select country: ${country.displayName}'),
);
```


## 2.0.25
* Add support for Haitian Creole (HT) localization
* Add support for Slovak (SK) localization
Expand All @@ -24,7 +39,7 @@

## 2.0.22
* Add support for Czech localization
* Fix typos Korean
* typos Korean

## 2.0.21
* Add support for Korean localization
Expand Down Expand Up @@ -88,7 +103,7 @@
);
```
* Implemented Country Service
* Fix package assets
* package assets

## 2.0.14
* Add support for country search by phone code
Expand All @@ -107,10 +122,10 @@
```
## 2.0.12
* Update example android gradle
* Fix Kurdish translation for Curaçao name
* Kurdish translation for Curaçao name
## 2.0.11
* Fix Eswatini name
* Fix Italy code at Turkish localization
* Eswatini name
* Italy code at Turkish localization
* Add optional argument for showing "World Wide" option at the beginning of the list
```Dart
showCountryPicker(
Expand Down Expand Up @@ -160,7 +175,7 @@
inputDecoration: InputDecoration(
labelText: 'Search',
hintText: 'Start typing to search',
prefixIcon: const Icon(Icons.search),
preIcon: const Icon(Icons.search),
border: OutlineInputBorder(
borderSide: BorderSide(
color: const Color(0xFF8C98A8).withOpacity(0.2),
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A flutter package to select a country from a list of countries.
Add the package to your pubspec.yaml:

```yaml
country_picker: ^2.0.25
country_picker: ^2.0.26
```

In your dart file, import the library:
Expand Down Expand Up @@ -58,6 +58,7 @@ MaterialApp(
* `showSearch` Can be used to show/hide the search bar.
* `showWorldWide` An optional argument for showing "World Wide" option at the beginning of the list
* `favorite` Can be used to show the favorite countries at the top of the list (optional).
* `moveAlongWithKeyboard` Can be used to move bottomSheet along with keyboard when textfield is focused (optional).
* `countryListTheme`: Can be used to customize the country list's bottom sheet and widgets that lie within it. (optional).
```Dart
showCountryPicker(
Expand Down
29 changes: 22 additions & 7 deletions example/.metadata
Original file line number Diff line number Diff line change
@@ -1,23 +1,38 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
# This file should be version controlled and should not be manually edited.

version:
revision: f72efea43c3013323d1b95cff571f3c1caa37583
channel: stable
revision: "54e66469a933b60ddf175f858f82eaeb97e48c8d"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: f72efea43c3013323d1b95cff571f3c1caa37583
base_revision: f72efea43c3013323d1b95cff571f3c1caa37583
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
- platform: android
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
- platform: ios
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
- platform: linux
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
- platform: macos
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
- platform: web
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
- platform: windows
create_revision: f72efea43c3013323d1b95cff571f3c1caa37583
base_revision: f72efea43c3013323d1b95cff571f3c1caa37583
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d

# User provided section

Expand Down
3 changes: 2 additions & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A flutter package to select a country from a list of countries.
Add the package to your pubspec.yaml:

```yaml
country_picker: ^2.0.25
country_picker: ^2.0.26
```

In your dart file, import the library:
Expand Down Expand Up @@ -58,6 +58,7 @@ MaterialApp(
* `showSearch` Can be used to show/hide the search bar.
* `showWorldWide` An optional argument for showing "World Wide" option at the beginning of the list
* `favorite` Can be used to show the favorite countries at the top of the list (optional).
* `moveAlongWithKeyboard` Can be used to move bottomSheet along with keyboard when textfield is focused (optional).
* `countryListTheme`: Can be used to customize the country list's bottom sheet and widgets that lie within it. (optional).
```Dart
showCountryPicker(
Expand Down
6 changes: 6 additions & 0 deletions example/android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ gradle-wrapper.jar
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java

# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
**/*.keystore
**/*.jks
41 changes: 22 additions & 19 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand All @@ -21,23 +22,31 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 33
namespace "com.countryPicker.example"
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}


defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.countryPicker.example"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion 33
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand All @@ -49,16 +58,10 @@ android {
signingConfig signingConfigs.debug
}
}
namespace 'com.countryPicker.example'
lint {
disable 'InvalidPackage'
}
}

flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
dependencies {}
3 changes: 2 additions & 1 deletion example/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
Expand Down
29 changes: 13 additions & 16 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="${applicationName}"
android:label="example"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:exported="true"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
Expand All @@ -24,15 +19,6 @@
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand All @@ -44,4 +30,15 @@
android:name="flutterEmbedding"
android:value="2" />
</application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility?hl=en and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ package com.countryPicker.example

import io.flutter.embedding.android.FlutterActivity

class MainActivity: FlutterActivity() {
}
class MainActivity: FlutterActivity()
4 changes: 2 additions & 2 deletions example/android/app/src/main/res/values-night/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
Expand Down
12 changes: 6 additions & 6 deletions example/android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">@android:color/white</item>
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
3 changes: 2 additions & 1 deletion example/android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
Expand Down
13 changes: 0 additions & 13 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
buildscript {
ext.kotlin_version = '1.6.21'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand Down
3 changes: 1 addition & 2 deletions example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
5 changes: 2 additions & 3 deletions example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Mon Feb 28 21:31:45 EET 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
Loading

0 comments on commit c735d27

Please sign in to comment.