0.1.0
This commit is contained in:
@@ -4,4 +4,8 @@ Initial release
|
||||
|
||||
## 0.0.2
|
||||
|
||||
Add favorite countries option.
|
||||
Add favorite countries option.
|
||||
|
||||
## 0.1.0
|
||||
|
||||
Removed flags in iOS because they show up weirdly.
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
class CElement {
|
||||
String name;
|
||||
String flag;
|
||||
@@ -8,10 +10,10 @@ class CElement {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return "$flag $dialCode";
|
||||
return defaultTargetPlatform == TargetPlatform.android ? "$flag $dialCode" : dialCode;
|
||||
}
|
||||
|
||||
String toLongString() {
|
||||
return "$flag $dialCode $name";
|
||||
return defaultTargetPlatform == TargetPlatform.android ? "$flag $dialCode $name" : "$dialCode $name";
|
||||
}
|
||||
}
|
||||
@@ -8,9 +8,9 @@ import 'package:country_code_picker/celement.dart';
|
||||
class CountryCodePicker extends StatefulWidget {
|
||||
final Function(String) onChanged;
|
||||
final String initialSelection;
|
||||
final List<String> favorites;
|
||||
final List<String> favorite;
|
||||
|
||||
CountryCodePicker({this.onChanged, this.initialSelection, this.favorites});
|
||||
CountryCodePicker({this.onChanged, this.initialSelection, this.favorite});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
@@ -53,7 +53,7 @@ class _CountryCodePickerState extends State<CountryCodePicker> {
|
||||
|
||||
favoriteElements = elements
|
||||
.where((e) =>
|
||||
widget.favorites.firstWhere((f) => e.code == f.toUpperCase(),
|
||||
widget.favorite.firstWhere((f) => e.code == f.toUpperCase(),
|
||||
orElse: () => null) !=
|
||||
null)
|
||||
.toList();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: country_code_picker
|
||||
description: A flutter package for showing a country code selector.
|
||||
version: 0.0.2
|
||||
version: 0.1.0
|
||||
author: Salvatore-Giordano <salvatoregiordanoo@gmail.com>
|
||||
homepage: https://github.com/Salvatore-Giordano/CountryCodePicker
|
||||
|
||||
|
||||
Reference in New Issue
Block a user