Field constructor

Field({
  1. required String name,
  2. required ItemType type,
  3. required bool isRequired,
  4. required bool ignore,
  5. required bool includeIfNull,
  6. required bool nonFinal,
  7. required bool ignoreEquality,
  8. String? description,
  9. String? unknownEnumValue,
  10. String? fromJson,
  11. String? toJson,
  12. String? defaultValue,
  13. String? jsonKey,
})

Implementation

Field({
  required String name,
  required this.type,
  required this.isRequired,
  required this.ignore,
  required this.includeIfNull,
  required this.nonFinal,
  required this.ignoreEquality,
  this.description,
  this.unknownEnumValue,
  this.fromJson,
  this.toJson,
  this.defaultValue,
  String? jsonKey,
})  : serializedName = jsonKey ?? name,
      name =
          CaseUtil(KeywordHelper.instance.getCorrectKeyword(name)).camelCase;