QueryKey<T extends Object?>.fromJson constructor
QueryKey<T extends Object?>.fromJson (
- Object? value
Restores a key from its JSON representation.
Implementation
factory QueryKey.fromJson(Object? value) {
if (value is! List || value.isEmpty || value.first is! String) {
throw FormatException('A query key must be a non-empty JSON array.');
}
return QueryKey<T>(value.first as String, value.skip(1));
}