mapGooglePayConfigurationResult function

GooglePayConfigureResult mapGooglePayConfigurationResult(
  1. String json
)

Implementation

GooglePayConfigureResult mapGooglePayConfigurationResult(String json) {
  final map = jsonDecode(json);
  switch (map[type]) {
    case success:
      return GooglePayConfigureSuccess();
    case error:
      return GooglePayConfigureError(map[message]);
    default:
      throw Exception(unknownGooglePayConfigurationResult);
  }
}