isSuccessResponse method

bool isSuccessResponse(
  1. Map<String, dynamic>? payload
)

Implementation

bool isSuccessResponse(Map<String, dynamic>? payload) {
  if (payload != null) {
    if (payload.containsKey('code')) {
      if (payload['code'] == 2000) {
        return true;
      } else {
        return false;
      }
    } else {
      return false;
    }
  } else {
    throw 'payload null';
  }
}