change naming

This commit is contained in:
imtoori
2019-12-09 23:03:17 +01:00
parent c526e0f654
commit 9e1347c6cf
2 changed files with 14 additions and 4 deletions

View File

@@ -0,0 +1,10 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=D:\Programmi\flutter"
export "FLUTTER_APPLICATION_PATH=C:\Users\Salvatore Giordano\development\CountryCodePicker\example"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
export "FLUTTER_FRAMEWORK_DIR=D:\Programmi\flutter\bin\cache\artifacts\engine\ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"

View File

@@ -32,13 +32,13 @@ class CountryCodePicker extends StatefulWidget {
final bool showFlag; final bool showFlag;
/// contains the country codes to load only the specified countries. /// contains the country codes to load only the specified countries.
final List<String> onlyCountries; final List<String> countryFilter;
CountryCodePicker({ CountryCodePicker({
this.onChanged, this.onChanged,
this.initialSelection, this.initialSelection,
this.favorite = const [], this.favorite = const [],
this.onlyCountries = const [], this.countryFilter = const [],
this.textStyle, this.textStyle,
this.padding = const EdgeInsets.all(0.0), this.padding = const EdgeInsets.all(0.0),
this.showCountryOnly = false, this.showCountryOnly = false,
@@ -63,9 +63,9 @@ class CountryCodePicker extends StatefulWidget {
)) ))
.toList(); .toList();
if(onlyCountries.length > 0) { if(countryFilter.length > 0) {
elements = elements elements = elements
.where((c) => onlyCountries.contains(c.code)) .where((c) => countryFilter.contains(c.code))
.toList(); .toList();
} }