#247 fixed flag from lower case country code

This commit is contained in:
Thibault Deckers 2022-05-10 10:32:26 +09:00
parent d358116219
commit 839f19a141
3 changed files with 4 additions and 2 deletions

View file

@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file.
### Added ### Added
- Bottom navigation bar
- Collection: thumbnail overlay tag icon
- Settings: search - Settings: search
- `huawei` app flavor (Petal Maps, no Crashlytics) - `huawei` app flavor (Petal Maps, no Crashlytics)

View file

@ -584,7 +584,7 @@ class AvesEntry {
: call()); : call());
if (addresses.isNotEmpty) { if (addresses.isNotEmpty) {
final address = addresses.first; final address = addresses.first;
final cc = address.countryCode; final cc = address.countryCode?.toUpperCase();
final cn = address.countryName; final cn = address.countryName;
final aa = address.adminArea; final aa = address.adminArea;
addressDetails = AddressDetails( addressDetails = AddressDetails(

View file

@ -84,7 +84,7 @@ class LocationFilter extends CoveredCollectionFilter {
static String? countryCodeToFlag(String? code) { static String? countryCodeToFlag(String? code) {
if (code == null || code.length != 2) return null; if (code == null || code.length != 2) return null;
return String.fromCharCodes(code.codeUnits.map((letter) => letter += _countryCodeToFlagDiff)); return String.fromCharCodes(code.toUpperCase().codeUnits.map((letter) => letter += _countryCodeToFlagDiff));
} }
} }