vanshg395 / intl_phone_field

A customised Flutter TextFormField to input international phone number along with country code.
https://pub.dev/packages/intl_phone_field
MIT License
177 stars 507 forks source link

Flags in linux are not shown anymore #357

Open florianguyot opened 11 months ago

florianguyot commented 11 months ago

Package 3.2.0 on linux does not show the correct flag ( cf : https://github.com/vanshg395/intl_phone_field/pull/28)

I think it is dues to the change #243 Use flag emoji instead of images on mobile.

The case of web is handled but computer distribution as Linux.

I think the change is a simple Patform check when the image is shown but I have to test other platform ( windows and mac)

(kIsWeb || Platform.isLinux)
    ? Image.asset(
       'assets/flags/${_selectedCountry.code.toLowerCase()}.png',
        package: 'intl_phone_field', 
        width: 32,
     ) : 
     Text(
          _selectedCountry.flag,
          style: const TextStyle(fontSize: 18),
      ),