defineDataResult<T> method

DataResult<T> defineDataResult<T>(
  1. NUIHttpResponse<NUIAuthStandardResp> resp, {
  2. dynamic successDataIfNull,
  3. dynamic failureData,
})

Implementation

DataResult<T> defineDataResult<T>(NUIHttpResponse<NUIAuthStandardResp> resp, {dynamic successDataIfNull, dynamic failureData}){
  return (resp.success && (resp.body?.success ?? false))
      ? _defineSuccess<T>(resp, dataIfNull: successDataIfNull)
      : _defineFailure<T>(resp, data: failureData);
}