CountryFlag.fromPhoneCode constructor
CountryFlag.fromPhoneCode(
- String phoneCode, {
- Key? key,
- CountryFlagMode mode = CountryFlagMode.emoji,
- CountryFlagStyle style = const CountryFlagStyle(),
- String unknownFlag = '🏳️',
- String svgUrlBuilder(
- String countryCode
- CountryFlagSvgBuilder? svgBuilder,
- String? semanticsLabel,
Create a flag by phone code (for example +1 or 44).
Implementation
factory CountryFlag.fromPhoneCode(
String phoneCode, {
Key? key,
CountryFlagMode mode = CountryFlagMode.emoji,
CountryFlagStyle style = const CountryFlagStyle(),
String unknownFlag = '🏳️',
String Function(String countryCode)? svgUrlBuilder,
CountryFlagSvgBuilder? svgBuilder,
String? semanticsLabel,
}) {
return CountryFlag(
key: key,
country: lookupByPhoneCode(phoneCode),
mode: mode,
style: style,
unknownFlag: unknownFlag,
svgUrlBuilder: svgUrlBuilder,
svgBuilder: svgBuilder,
semanticsLabel: semanticsLabel,
);
}