Discriminator constructor

const Discriminator({
  1. required String propertyName,
  2. Map<String, String>? mapping,
})

Implementation

const factory Discriminator({
  /// The name of the property in the payload that will hold the discriminator value.
  required String propertyName,

  /// An object to hold mappings between payload values and schema names or references.
  Map<String, String>? mapping,
}) = _Discriminator;