mapPaymentChannelsResult function
- String json
Implementation
PaymentChannelsResult mapPaymentChannelsResult(String json) {
final map = jsonDecode(json);
switch (map[type]) {
case success:
return PaymentChannelsSuccess.fromJson(map);
case error:
return PaymentChannelsError(message: map[message]);
default:
throw Exception(unknownType);
}
}