fromJson method Null safety
- Object json
override
Implementation
@override
T fromJson(Object json) {
if (json is Map<String, dynamic>) {
if (json.containsKey('participant_count')) {
return OpenChannel.fromJsonAndCached(json) as T;
} else {
return GroupChannel.fromJsonAndCached(json) as T;
}
}
return json as T;
}