NostrCountResponse.deserialized constructor
NostrCountResponse.deserialized(
- String data
Implementation
factory NostrCountResponse.deserialized(String data) {
final decodedData = jsonDecode(data);
assert(decodedData is List);
final countMap = decodedData[2];
assert(countMap is Map);
return NostrCountResponse(
subscriptionId: decodedData[1] as String,
count: int.parse(countMap['count'] as String),
);
}