Nettoyage et tet hook

This commit is contained in:
2025-08-26 17:49:11 +02:00
parent ee940e25b7
commit 979114b93d
22 changed files with 16 additions and 4162 deletions
+14
View File
@@ -0,0 +1,14 @@
class Env {
// Base URL de l'API, surchargeable à la compilation via --dart-define=API_BASE_URL
static const String apiBaseUrl = String.fromEnvironment(
'API_BASE_URL',
defaultValue: 'https://ynov.ptits-pas.fr',
);
// Construit une URL vers l'API v1 à partir d'un chemin (commençant par '/')
static String apiV1(String path) => "${apiBaseUrl}/api/v1$path";
}
@@ -1,8 +1,9 @@
import 'package:http/http.dart' as http;
import 'dart:convert';
import 'package:p_tits_pas/config/env.dart';
class BugReportService {
static const String _apiUrl = 'https://ynov.ptits-pas.fr/api/bug-reports';
static final String _apiUrl = Env.apiV1('/bug-reports');
static Future<void> sendReport(String description) async {
try {