Flag.fromString constructor

const Flag.fromString(
  1. String country, {
  2. Key? key,
  3. double? height,
  4. double? width,
  5. BoxFit fit = BoxFit.contain,
  6. Widget replacement = const SizedBox.shrink(),
  7. FlagSize flagSize = FlagSize.size_4x3,
  8. double? borderRadius,
})

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.fromString(
  this.country, {
  Key? key,
  this.height,
  this.width,
  this.fit = BoxFit.contain,
  this.replacement = const SizedBox.shrink(),
  this.flagSize = FlagSize.size_4x3,
  this.borderRadius,
})  : assert(
        country != '',
        'A non-null Country Code String must be provided to a Flag widget.',
      ),
      this.countryCode = FlagsCode.NULL,
      super(key: key);