ApiClient constructor
Implementation
ApiClient(String baseUrl, {String? bearerToken}) {
_dio = Dio(
BaseOptions(
baseUrl: baseUrl,
connectTimeout: Duration(milliseconds: 5000),
receiveTimeout: Duration(milliseconds: 3000),
),
)..interceptors.add(Logging());
if (bearerToken != null) {
_bearerToken = "Bearer $bearerToken";
}
}