Extension constructor
Constructs a new Extension with an optional URL, nested extensions, and a boolean value.
Implementation
Extension({
Uri? url,
FixedList<Extension>? extension,
bool? valueBoolean,
}) : this.fromJson(
JsonObject({
if (url != null) urlField.name: JsonString(url.toString()),
if (extension != null)
extensionField.name:
JsonArray(extension.map((e) => e.json).toList()),
if (valueBoolean != null)
valueBooleanField.name: JsonBoolean(valueBoolean),
}),
);