DioClient constructor

DioClient({
  1. int timeout = 10,
  2. Environment? environment,
})

Implementation

DioClient({this.timeout = 10, this.environment}) {
  log(environment?.getApiUrl()??'');
  client = dio.Dio(dio.BaseOptions(
    connectTimeout: Duration(seconds: timeout),
    sendTimeout:Duration(seconds: timeout),
    receiveTimeout: Duration(seconds: timeout),
    baseUrl: environment?.getApiUrl()??'',
  ));
}