@override Map<String, Object?> toJson() => { if (channel != null) "channel": encodeValue(channel), if (error != null) "error": encodeValue(error), };