HumanName constructor

HumanName({
  1. String? family,
  2. String? use,
  3. FixedList<String>? given,
  4. FixedList<String>? prefix,
})

Constructs a new HumanName with optional family, use, given and prefix.

Implementation

HumanName({
  String? family,
  String? use,
  FixedList<String>? given,
  FixedList<String>? prefix,
}) : this.fromJson(
        JsonObject({
          if (family != null) familyField.name: JsonString(family),
          if (use != null) useField.name: JsonString(use),
          if (given != null)
            givenField.name:
                JsonArray.unmodifiable(given.map(JsonString.new)),
          if (prefix != null)
            prefixField.name:
                JsonArray.unmodifiable(prefix.map(JsonString.new)),
        }),
      );