SmartResponse.fromJson constructor

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

Implementation

factory SmartResponse.fromJson(Map<String, dynamic> json) {
  return SmartResponse(
    success: json['status'] == 'success',
    data: json['data'] as String?,
    statusCode: json['status_code'] as int?,
    error: json['error'] as String?,
    errorType: json['error_type'] as String?,
  );
}