GeneralCallback<T>.simple constructor
GeneralCallback<T>.simple (
- BuildContext context,
- dynamic onSuccess(
- T data
Implementation
factory GeneralCallback.simple(
BuildContext context,
Function(T data) onSuccess,
) {
return GeneralCallback<T>(
onFailure: (DioException e) => ApUtils.showToast(context, e.i18nMessage),
onError: (GeneralResponse e) => ApUtils.showToast(context, e.message),
onSuccess: onSuccess,
);
}