Flag.fromCode constructor
const
Flag.fromCode(})
Creates a flag widget.
If the fit
argument is null, the text will use the BoxFit.contain.
The country parameter must not be null.
Implementation
const Flag.fromCode(
this.countryCode, {
Key? key,
this.height,
this.width,
this.fit = BoxFit.contain,
this.replacement = const SizedBox.shrink(),
this.flagSize = FlagSize.size_4x3,
this.borderRadius,
}) : assert(
countryCode != FlagsCode.NULL,
'A non-NULL Country Code must be provided to a Flag widget.',
),
this.country = '',
super(key: key);