CountryElement constructor

CountryElement({
  1. String? id,
  2. String? initValue,
  3. DecorationElement? decorationElement,
  4. String? label,
  5. String? errorMsg = "invalid Country",
  6. String labelModalSheet = "Pays",
  7. String labelSearchModalSheet = "Recherche",
  8. CountryTextResult countryTextResult = CountryTextResult.FullName,
  9. bool showFlag = false,
  10. EdgeInsets padding = const EdgeInsets.all(2.0),
  11. bool visibility = true,
  12. bool readOnly = false,
})

Implementation

CountryElement({
  String? id,
  this.initValue,
  this.decorationElement,
  this.label,
  this.errorMsg = "invalid Country",
  this.labelModalSheet = "Pays",
  this.labelSearchModalSheet = "Recherche",
  this.countryTextResult = CountryTextResult.FullName,
  this.showFlag = false,
  this.padding = const EdgeInsets.all(2.0),
  bool visibility = true,
  bool readOnly = false,
})  : assert((countryTextResult == CountryTextResult.countryCode &&
              (initValue!.isEmpty || initValue.length == 3)) ||
          (countryTextResult == CountryTextResult.FullName)),
      super(
        id: id,
        initValue: initValue,
        decorationElement: decorationElement,
        label: label,
        readOnly: readOnly,
        padding: padding,
        error: errorMsg,
        visibility: visibility,
      );