DataRefModel class
- Inheritance
- Available extensions
Constructors
-
DataRefModel({String? id, List<
String> ? collection}) -
const
-
DataRefModel.c2({String? id, List<
String> ? collection}) -
const
-
DataRefModel.c3({String? id, List<
String> ? collection}) -
factory
- DataRefModel.from(BaseModel? other)
-
factory
-
DataRefModel.fromJson(Map<
String, dynamic> ? otherData) -
factory
- DataRefModel.fromJsonString(String source)
-
factory
- DataRefModel.fromUri(Uri? uri)
-
factory
- DataRefModel.of(DataRefModel other)
-
factory
Properties
- $className → String
-
The class name of the model as a string.
no setteroverride
-
collection
→ List<
String> ? -
final
-
collectionField
→ List<
String> ? -
no setter
- collectionPath → String?
-
Available on DataRefModel, provided by the DataRefModelExtension extension
The collection path of the model for databases like Firestore.no setter -
data
→ Map<
String, dynamic> -
no setterinherited
-
doc
→ List<
String> -
Available on DataRefModel, provided by the DataRefModelExtension extension
The document path of the model.no setter - docPath → String
-
Available on DataRefModel, provided by the DataRefModelExtension extension
The document path of the model for databases like Firestore.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
final
- idField → String?
-
no setter
- ref → DataRefModel?
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
BaseModel? other, {bool merge = false}) → DataRefModel -
Returns a new copy of the BaseModel with the fields updated from the
otherBaseModel. Ifmergeistrue, the fields are merged, otherwise they are replaced.override -
equals(
dynamic other) → bool -
Compares the BaseModel with another BaseModel using the
DeepCollectionEqualityand returnstrueif they are equal.inherited -
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 +(
DataRefModel other) → DataRefModel -
Available on DataRefModel, provided by the DataRefModelExtension extension
Adds two DataRefModel objects. -
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromJsonOrNull(
Map< String, dynamic> ? otherData) → DataRefModel? -
fromJsonStringOrNull(
String? source) → DataRefModel? -
override
-
fromOrNull(
BaseModel? other) → DataRefModel? -
fromUriOrNull(
Uri? uri) → DataRefModel? -
ofOrNull(
DataRefModel? other) → DataRefModel?
Constants
- CLASS_NAME → const String