Skip to content

v2.0.28

Latest

Choose a tag to compare

@Daniel-Ioannou Daniel-Ioannou released this 10 Jun 21:14
f4a2cf6

In this version:

  • Fixed getFromPhoneCode failing when multiple countries share the same phone code.
  • Fixed incomplete phone prefix.
  • Add optional header. Custom list header above search bar
    showCountryPicker(
        context: context,
        header: Padding(
            padding: const EdgeInsets.only(top: 10.0, bottom: 10.0, left: 20.0, right: 20.0),
            child: const Text(
               'Select your country',
               style: TextStyle(
                  fontSize: 22,
                  fontWeight: FontWeight.bold,
               ),
            ),
        ),
        onSelect: (Country country) {
            print('Select country: ${country.displayName}');
        },
    );
  • Add an option to show the drag handle
    showCountryPicker(
        context: context,
        showDragHandle: true,
        onSelect: (Country country) {
            print('Select country: ${country.displayName}');
        },
    );