DataRefModel class

Generated class for _DataRefModel.

Inheritance
Available extensions

Constructors

DataRefModel({String? id, required List<String>? collection})
Constructs a new instance of DataRefModel from optional and required parameters.
const
DataRefModel.assertRequired({String? id, List<String>? collection})
Constructs a new instance of DataRefModel, and asserts that all required parameters are not null.
factory
DataRefModel.from(BaseModel another)
Constructs a new instance of DataRefModel, from the fields of another instance. Throws if the conversion fails.
factory
DataRefModel.fromJson(Map<String, dynamic>? json)
Constructs a new instance of DataRefModel, from json, which must be a valid JSON object. Throws if the conversion fails.
factory
DataRefModel.fromJsonString(String jsonString)
Constructs a new instance of DataRefModel, from jsonString, which must be a valid JSON String. Throws if the conversion fails.
factory
DataRefModel.fromUri(Uri? uri)
Constructs a new instance of DataRefModel, from the query parameters of uri. Throws if the conversion fails.
factory
DataRefModel.of(DataRefModel another)
Constructs a new instance of DataRefModel, from the fields of another instance. Throws if the conversion fails.
factory
DataRefModel.optional({String? id, List<String>? collection})
Construcs a new instance of DataRefModel, forcing all parameters to be optional.
const

Properties

$className String
The runtime type of this class as a String.
no setteroverride
collection List<String>?
A list representing the hierarchical path where the document or collection resides.
final
collection$ List<String>
Returns the value of the collection field. If the field is nullable, the return value may be null; otherwise, it will always return a non-null value.
no setter
data Map<String, dynamic>
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String?
The document ID within the database. If null, the reference points to a collection instead of a specific document.
final
id$ String?
Returns the value of the id field. If the field is nullable, the return value may be null; otherwise, it will always return a non-null value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({String? id, List<String>? collection}) DataRefModel
Creates a copy of this instance, replacing the specified fields.
copyWithout({bool id = true, bool collection = true}) DataRefModel
Creates a copy of this instance, removing the specified fields.
equals(dynamic other) bool
Compares the BaseModel with another BaseModel using the DeepCollectionEquality and returns true if they are equal.
inherited
mergeWith(BaseModel? other, {bool deepMerge = false}) DataRefModel
Returns a new copy of the BaseModel with the fields updated from the other BaseModel. Set deepMerge to true to merge nested objects.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sortedJson({bool includeNulls = false}) Map<String, dynamic>
Returns a Json i.e. Map<String, dynamic> representation of the BaseModel, with the keys sorted alphabetically.
inherited
toJson({bool includeNulls = false}) Map<String, dynamic>
Returns a Json i.e. Map<String, dynamic> representation of the BaseModel.
override
toJsonString() String
Returns a JSON string representation of the BaseModel.
inherited
toString() String
A string representation of this object.
inherited
toUrl() Uri
Converts the current BaseModel to a Uri that can be used as a distinct identifier. The model must not be too large to avoid exceeding the maximum length of a URL.
inherited

Operators

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

Static Methods

fromJsonOrNull(Map<String, dynamic>? json) DataRefModel?
Constructs a new instance of DataRefModel, from json, which must be a valid JSON object. Returns null if json is null or if the conversion fails.
fromJsonStringOrNull(String? jsonString) DataRefModel?
Constructs a new instance of DataRefModel, from jsonString, which must be a valid JSON String. Returns null if jsonString is null or if the conversion fails.
override
fromOrNull(BaseModel? another) DataRefModel?
Constructs a new instance of DataRefModel, from the fields of another instance. Returns null if another is null or if the conversion fails.
fromUriOrNull(Uri? uri) DataRefModel?
Constructs a new instance of DataRefModel, from the query parameters of uri. Returns null if uri is null or if the conversion fails.
ofOrNull(DataRefModel? other) DataRefModel?
Constructs a new instance of DataRefModel, from the fields of another instance. Returns null if another is null or if the conversion fails.

Constants

CLASS_NAME → const String
The runtime type of this class as a String.