DatabaseData class

Represents the data to interact with the storage system.

Available Extensions
Annotations
  • @CopyWith()
  • @JsonSerializable()

Constructors

DatabaseData({int? id, String? value, required String key, required DataType type, required QueryParams queryParams, required DateTime updatedAt, required DateTime lastUsedAt, required int useCount})
Create a new instance of DatabaseData.
DatabaseData.fromJson(Map<String, dynamic> json)
Create a new instance of DatabaseData from json.
factory
DatabaseData.fromUserValue({required dynamic value, required String key, required QueryParams queryParams, required DateTime dateTime})
Create a new instnace of DatabaseData from user provided values.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
id int?
The unique ID, usually generated automatically.
final
key String
The key for the data.
final
lastUsedAt DateTime
The datetime of the data is last used.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
queryParams QueryParams
The query parameters associated with the data.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool
If set to true, the toString method will be overridden to output this instance's props.
no setter
type DataType
The type of the data.
final
updatedAt DateTime
The datetime of the data is updated.
final
useCount int
The data use count.
final
userValue → dynamic
Return the original data value with its type.
no setter
value String?
The data value.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Return a json representation of the object.
toString() String
A string representation of this object.
inherited

Operators

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