JsonKey constructor

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

Creates a new JsonKey instance.

Use this constructor when the default behavior is not desired.

Implementation

const JsonKey({
  @Deprecated('Has no effect') bool? nullable,
  this.defaultValue,
  this.disallowNullValue,
  this.explicitJsonNullWhenNonNullField,
  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,
});