Flags.fromCode constructor

const Flags.fromCode(
  1. List<FlagsCode> countryCodes, {
  2. Key? key,
  3. double height = 300,
  4. double width = 400,
  5. Widget replacement = const SizedBox.shrink(),
  6. FlagSize flagSize = FlagSize.size_4x3,
  7. 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 Flags.fromCode(
  this.countryCodes, {
  Key? key,
  this.height = 300,
  this.width = 400,
  this.replacement = const SizedBox.shrink(),
  this.flagSize = FlagSize.size_4x3,
  this.borderRadius,
})  : assert(
        countryCodes.length == 2,
        'countiyCodes count must be 2.',
      ),
      this.counties = const [],
      super(key: key);