Meta constructor

Meta({
  1. DateTime? lastUpdated,
  2. String? versionId,
  3. String? source,
  4. FixedList<String>? profile,
  5. FixedList<Tag>? tag,
})

Constructs a new Meta with an optional last updated date, version ID

Implementation

Meta({
  DateTime? lastUpdated,
  String? versionId,
  String? source,
  FixedList<String>? profile,
  FixedList<Tag>? tag,
}) : this.fromJson(
        JsonObject({
          if (lastUpdated != null)
            lastUpdatedField.name: JsonString(lastUpdated.toIso8601String()),
          if (versionId != null) versionIdField.name: JsonString(versionId),
          if (source != null) sourceField.name: JsonString(source),
          if (profile != null)
            profileField.name: JsonArray.unmodifiable(
              profile.map(JsonString.new),
            ),
          if (tag != null)
            tagField.name: JsonArray.unmodifiable(
              tag.map((e) => e.json),
            ),
        }),
      );