defineDataResult<T> method
DataResult<T>
defineDataResult<T>(
- NUIHttpResponse<
NUIAuthStandardResp> resp, { - dynamic successDataIfNull,
- 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);
}