2023-12-29 17:13:51 +00:00
|
|
|
import 'package:dio/dio.dart';
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
|
|
|
|
|
|
class ApiClient {
|
2023-12-30 21:23:42 +00:00
|
|
|
static const String _apiBase =
|
2024-02-17 18:50:15 +00:00
|
|
|
kDebugMode ? "http://localhost:8081/api" : "api";
|
2023-12-29 17:13:51 +00:00
|
|
|
final Dio _dio = Dio(BaseOptions(baseUrl: _apiBase));
|
|
|
|
|
|
|
|
String? token;
|
|
|
|
DateTime? tokenValidUntil;
|
|
|
|
|
|
|
|
ApiClient();
|
|
|
|
|
|
|
|
Dio getRawClient() {
|
|
|
|
return _dio;
|
|
|
|
}
|
|
|
|
}
|