mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
Delete unused file
This commit is contained in:
@ -1,36 +0,0 @@
|
|||||||
import 'package:dio/dio.dart';
|
|
||||||
|
|
||||||
import '../../utils/constants/api_const.dart';
|
|
||||||
|
|
||||||
class DioInstance {
|
|
||||||
Dio? _dio;
|
|
||||||
|
|
||||||
Dio get dio => _dio ?? _instantiate();
|
|
||||||
|
|
||||||
String? baseUrl;
|
|
||||||
|
|
||||||
DioInstance({this.baseUrl});
|
|
||||||
|
|
||||||
Dio _instantiate() {
|
|
||||||
Dio dio = Dio(
|
|
||||||
BaseOptions(
|
|
||||||
baseUrl: baseUrl ?? '${ApiEndpoints.baseUrl}/',
|
|
||||||
receiveDataWhenStatusError: true,
|
|
||||||
headers: {
|
|
||||||
'content_Type': 'application/json',
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
dio.interceptors.add(
|
|
||||||
LogInterceptor(
|
|
||||||
responseHeader: false,
|
|
||||||
requestHeader: false,
|
|
||||||
requestBody: true,
|
|
||||||
responseBody: true,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
return dio;
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user