aurcache/frontend/lib/api/api_client.dart

18 lines
347 B
Dart
Raw Normal View History

2023-12-29 17:13:51 +00:00
import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
class ApiClient {
static const String _apiBase =
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;
}
}