From 057bd487404d8458319f0b7821a41ce5738ebe9b Mon Sep 17 00:00:00 2001 From: Matias de Andrea Date: Mon, 20 Nov 2023 21:00:40 +0100 Subject: [PATCH] fix: change dio service null values --- lib/data/services/dio_service.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/data/services/dio_service.dart b/lib/data/services/dio_service.dart index 409ce41..7933eb9 100644 --- a/lib/data/services/dio_service.dart +++ b/lib/data/services/dio_service.dart @@ -75,13 +75,13 @@ class DioRestService { _dio = initDio; } - Future> get( + Future> get( Uri uri, { Map? headers, }) async { return _tryCatch( () async { - final response = await _dio.getUri( + final response = await _dio.getUri( uri, options: Options(headers: headers), ); @@ -90,14 +90,14 @@ class DioRestService { ); } - Future> post( + Future> post( Uri uri, { Object? data, Map? headers, }) async { return _tryCatch( () async { - final response = await _dio.postUri( + final response = await _dio.postUri( uri, data: data, options: Options(headers: headers), @@ -107,7 +107,7 @@ class DioRestService { ); } - Future> _tryCatch(Future Function() function) async { + Future> _tryCatch(Future Function() function) async { try { final result = await function(); return Right(result);