DehydratedQuery.fromJson constructor

DehydratedQuery.fromJson(
  1. Map<String, Object?> json
)

Decodes a query from JSON-compatible data.

Implementation

factory DehydratedQuery.fromJson(Map<String, Object?> json) =>
    DehydratedQuery(
      key: QueryKey<Object?>.fromJson(json['key']),
      state: Map<String, Object?>.from(json['state']! as Map),
      dehydratedAt: DateTime.fromMillisecondsSinceEpoch(
        json['dehydratedAt']! as int,
      ),
      meta: json['meta'] == null
          ? const <String, Object?>{}
          : Map<String, Object?>.from(json['meta']! as Map),
    );