TSerializableId class abstract

Abstract base class providing serialization to multiple data formats.

Extends TWriteableId and provides convenience methods for converting the object into YAML, Markdown, and XML representations. Requires concrete implementations to provide builder functions for each format they wish to support.

Inheritance

Constructors

TSerializableId({String yamlBuilder(TWriteableId writeable, bool includeMetaData)?, TMdFactory<TWriteable>? mdFactory, String xmlBuilder(TWriteableId writeable, bool includeMetaData)?})

Properties

hashCode int
The hash code for this object.
no setterinherited
id String
The unique string identifier for this object.
no setteroverride
isDefault bool
Returns true if the ID of this object is equal to the default ID value defined in TSDefaults.
no setteroverride
mdFactory TMdFactory<TWriteable>?
Returns a function that builds a Markdown string from a JSON map.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
xmlBuilder String Function(TWriteableId writeable, bool includeMetaData)?
Returns a function that builds an XML string from a JSON map.
final
yamlBuilder String Function(TWriteableId writeable, bool includeMetaData)?
Returns a function that builds a YAML string from a JSON map.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the object to a Firestore-compatible map.
inherited
toMd({TMdFactory<TWriteable>? mdFactory, bool includeMetaData = true, int headingLevel = 1, KeyValueBuilderDef? titleBuilder, KeyValueBuilderDef? listItemBuilder, String metaDataKey = TSDefaults.metaDataKey, String emojiKey = TSDefaults.emojiKey, String nameKey = TSDefaults.nameKey, String descriptionKey = TSDefaults.descriptionKey, String valueKey = TSDefaults.valueKey, String valuesKey = TSDefaults.valuesKey, String itemsKey = TSDefaults.itemsKey}) String
Converts this object to a Markdown string.
toString() String
A string representation of this object.
inherited
toXml({bool includeMetaData = true, KeyValueBuilderDef? keyBuilder, KeyValueBuilderDef? listItemBuilder, String metaDataKey = TSDefaults.metaDataKey}) String
Converts this object to an XML string.
toYaml({bool includeMetaData = true, KeyValueBuilderDef? keyBuilder, String metaDataKey = TSDefaults.metaDataKey, KeyValueBuilderDef? listItemBuilder}) String
Converts this object to a YAML string.
validate<T>() → TurboResponse<T>?
Validates the object's data before writing to Firestore.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited