Skip to main content

CachedUserAction class

CachedUserAction class represents a user action that is cached for offline use.

This class provides the following functionalities:

  • toJson : converts a CachedUserAction to a JSON-compatible map.
  • fromJson : creates a CachedUserAction from a JSON-compatible map.
  • execute : executes the cached user action based on its operation type.

Inheritance

: - Object

Annotations

: - @HiveType(typeId: 3)

Constructors

[CachedUserAction][]

:

[CachedUserAction.fromJson][([[Map[<[String], dynamic>]] json])] : Creates a CachedUserAction from a JSON-compatible map. ::: factory :::

Properties

[box] [→ BoxBase?] : Get the box in which this object is stored. Returns null if object has not been added to a box yet. ::: features no setterinherited :::

[expiry] [↔ DateTime] : The expiry date and time for the cached user action. ::: features getter/setter pair :::

[hashCode] [→ int] : The hash code for this object. ::: features no setterinherited :::

[id] [↔ String] : The unique identifier for the cached user action. ::: features getter/setter pair :::

[isInBox] [→ bool] : Returns whether this object is currently stored in a box. ::: features no setterinherited :::

[key] → dynamic : Get the key associated with this object. Returns null if object has not been added to a box yet. ::: features no setterinherited :::

[metaData] [↔ Map[<[String], dynamic>]?] : Any additional metadata related to the cached user action. ::: features getter/setter pair :::

[operation] [↔ String] : The operation to be performed for the cached user action. ::: features getter/setter pair :::

[operationType] [↔ CachedOperationType] : The type of operation for the cached user action. ::: features getter/setter pair :::

[runtimeType] [→ Type] : A representation of the runtime type of the object. ::: features no setterinherited :::

[status] [↔ CachedUserActionStatus] : The status of the cached user action. ::: features getter/setter pair :::

[timeStamp] [↔ DateTime] : The timestamp when the action was cached. ::: features getter/setter pair :::

[variables] [↔ Map[<[String], dynamic>]?] : The variables required for the operation, if any. ::: features getter/setter pair :::

Methods

[delete][ [→ Future<[void>]] ] : Deletes this object from the box it is stored in. ::: features inherited :::

[execute][ [→ Future[<[QueryResult[<[Object?]>]]>]] ] : Executes the cached user action based on its operation type.

[noSuchMethod][([[Invocation] invocation]) → dynamic ] : Invoked when a nonexistent method or property is accessed. ::: features inherited :::

[save][ [→ Future<[void>]] ] : Persists this object. ::: features inherited :::

[toJson][ [→ Map[<[String], dynamic>]] ] : Converts a CachedUserAction to a JSON-compatible map.

[toString][ [→ String] ] : A string representation of this object. ::: features override :::

Operators

[operator ==][([[Object] other]) [→ bool] ] : The equality operator. ::: features inherited :::

  1. talawa
  2. cached_user_action
  3. CachedUserAction class
cached_user_action library