GatewayError.fromJson constructor

GatewayError.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory GatewayError.fromJson(Map<String, dynamic> json) => GatewayError(
      code: GatewayErrorCode.fromWire(json['code'] as String?),
      message: (json['message'] as String?) ?? '',
      httpStatus: (json['httpStatus'] as num?)?.toInt(),
      attempt: (json['attempt'] as num?)?.toInt(),
      recoverable: (json['recoverable'] as bool?) ?? false,
    );