We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i imported the package and try to use it by default but i get this error and my screen pops because of that
here is my usage:
class CountryPickerWidget extends StatelessWidget { final bool filtered;
const CountryPickerWidget({Key? key, required this.filtered}) : super(key: key);
@OverRide Widget build(BuildContext context) { return Row( children: [ CountryPickerDropdown( initialValue: 'US', // Default value itemBuilder: (Country country) { context.read().add(UpdatePhoneCode('+${country.phoneCode}')); return Container( child: Row( children: [ const SizedBox(width: 15), CountryPickerUtils.getDefaultFlagImage(country), const SizedBox(width: 8), Text('+${country.phoneCode}'), ], ), ); }, itemFilter: filtered ? (c) => ['US', 'CA'].contains(c.isoCode) : null, onValuePicked: (Country country) { // Dispatch the event to update the phone code print('Country picked: ${country.isoCode}, phoneCode: +${country.phoneCode}'); context.read().add(UpdatePhoneCode('+${country.phoneCode}')); }, ), ], ); } }
and i refer to that widget as any other afterwards, this happened with latest version
The text was updated successfully, but these errors were encountered:
No branches or pull requests
i imported the package and try to use it by default but i get this error and my screen pops because of that
here is my usage:
class CountryPickerWidget extends StatelessWidget {
final bool filtered;
const CountryPickerWidget({Key? key, required this.filtered}) : super(key: key);
@OverRide
Widget build(BuildContext context) {
return Row(
children: [
CountryPickerDropdown(
initialValue: 'US', // Default value
itemBuilder: (Country country) {
context.read().add(UpdatePhoneCode('+${country.phoneCode}'));
return Container(
child: Row(
children: [
const SizedBox(width: 15),
CountryPickerUtils.getDefaultFlagImage(country),
const SizedBox(width: 8),
Text('+${country.phoneCode}'),
],
),
);
},
itemFilter: filtered ? (c) => ['US', 'CA'].contains(c.isoCode) : null,
onValuePicked: (Country country) {
// Dispatch the event to update the phone code
print('Country picked: ${country.isoCode}, phoneCode: +${country.phoneCode}');
context.read().add(UpdatePhoneCode('+${country.phoneCode}'));
},
),
],
);
}
}
and i refer to that widget as any other afterwards, this happened with latest version
The text was updated successfully, but these errors were encountered: