JsonKey constructor

const JsonKey({
  1. @Deprecated('Has no effect') bool? nullable,
  2. Object? defaultValue,
  3. bool? disallowNullValue,
  4. Function? fromJson,
  5. @Deprecated('Use `includeFromJson` and `includeToJson` with a value of `false` ' 'instead.') bool? ignore,
  6. bool? includeFromJson,
  7. bool? includeIfNull,
  8. bool? includeToJson,
  9. String? name,
  10. Object? readValue(
    1. Map,
    2. String
    )?,
  11. bool? required,
  12. Function? toJson,
  13. Enum? unknownEnumValue,
})

Creates a new JsonKey instance.

Only required when the default behavior is not desired.

Implementation

const JsonKey({
  @Deprecated('Has no effect') bool? nullable,
  this.defaultValue,
  this.disallowNullValue,
  this.fromJson,
  @Deprecated(
    'Use `includeFromJson` and `includeToJson` with a value of `false` '
    'instead.',
  )
  this.ignore,
  this.includeFromJson,
  this.includeIfNull,
  this.includeToJson,
  this.name,
  this.readValue,
  this.required,
  this.toJson,
  this.unknownEnumValue,
});