postCached<T> method
Future<Result<T> >
postCached<T>(
- String path, {
- dynamic data,
- Map<
String, dynamic> ? queryParameters, - FutureOr<
T> onSuccess(- dynamic data
- FutureOr<
T> onError(- dynamic data
override
Implementation
@override
Future<Result<T>> postCached<T>(
String path, {
data,
Map<String, dynamic>? queryParameters,
FutureOr<T> Function(dynamic data)? onSuccess,
FutureOr<T> Function(dynamic data)? onError,
}) async {
final requestOptions = RequestOptions(
path: path,
queryParameters: queryParameters,
data: data,
headers: _dio.options.headers,
);
return CacheResult(
data: await _resolveResult(
(await cacheHandler.get(requestOptions)),
onSuccess,
),
);
}