DehydratedState.fromJson constructor
Decodes a snapshot from JSON-compatible data.
Implementation
factory DehydratedState.fromJson(Map<String, Object?> json) =>
DehydratedState(
queries: (json['queries'] as List? ?? const <Object?>[])
.map(
(value) => DehydratedQuery.fromJson(
Map<String, Object?>.from(value! as Map),
),
)
.toList(growable: false),
mutations: (json['mutations'] as List? ?? const <Object?>[])
.map(
(value) => DehydratedMutation.fromJson(
Map<String, Object?>.from(value! as Map),
),
)
.toList(growable: false),
);