chore: suppression du code mort (détection auto, distorsion, ML Kit)
- Supprime 5 services inatteignables depuis l'UI (~3 000 lignes) : distortion_correction, image_processing, target_detection, opencv_impact_detection, target_rectify - AnalysisProvider allégé (835 -> ~360 lignes) : retrait de la détection par références, de la détection auto d'impacts, du workflow distorsion et du doublon moveShot - Retire les dépendances inutilisées google_mlkit_object_detection et google_mlkit_document_scanner du pubspec - Le bouton ↻ du Plotting efface désormais tous les impacts en un clic (clearShots) sans relancer la détection auto ni toucher la calibration - Nettoie les paramètres morts de TargetOverlay (referenceImpacts, onAddShot), le flag _isSelectingReferences, _buildActionButtons vide et le résidu _detectionTimer de capture_screen - Supprime le dossier tests/ (brouillons d'expérimentation OpenCV) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,6 @@ import '../../core/theme/app_theme.dart';
|
||||
import '../../data/models/target_type.dart';
|
||||
import '../../data/models/shot.dart';
|
||||
import '../../data/repositories/session_repository.dart';
|
||||
import '../../services/target_detection_service.dart';
|
||||
import '../../services/score_calculator_service.dart';
|
||||
import '../../services/grouping_analyzer_service.dart';
|
||||
import '../../services/wallet_identity_service.dart';
|
||||
@@ -61,7 +60,6 @@ class AnalysisScreen extends StatelessWidget {
|
||||
return ChangeNotifierProvider(
|
||||
create: (context) {
|
||||
final p = AnalysisProvider(
|
||||
detectionService: context.read<TargetDetectionService>(),
|
||||
scoreCalculatorService: context.read<ScoreCalculatorService>(),
|
||||
groupingAnalyzerService: context.read<GroupingAnalyzerService>(),
|
||||
sessionRepository: context.read<SessionRepository>(),
|
||||
@@ -73,7 +71,6 @@ class AnalysisScreen extends StatelessWidget {
|
||||
p.analyzeImage(
|
||||
imagePath,
|
||||
targetType,
|
||||
autoAnalyze: false,
|
||||
manualCenter: manualCenterOffset,
|
||||
);
|
||||
return p;
|
||||
@@ -111,7 +108,6 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
|
||||
// Forcé à TRUE pour démarrer sur l'ajustement des cercles
|
||||
bool _isCalibrating = true;
|
||||
bool _isSelectingReferences = false;
|
||||
bool _isAtBottom = false;
|
||||
|
||||
final ScrollController _scrollController = ScrollController();
|
||||
@@ -192,7 +188,6 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
if (validated == true) {
|
||||
setState(() {
|
||||
_isCalibrating = false;
|
||||
_isSelectingReferences = false;
|
||||
});
|
||||
} else {
|
||||
_enterCalibration();
|
||||
@@ -250,17 +245,17 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
},
|
||||
),
|
||||
actions: [
|
||||
if (!_isCalibrating && !_isSelectingReferences)
|
||||
// Remise à zéro des impacts : efface tous les impacts en un clic,
|
||||
// sans modifier la calibration (centre, rayon, anneaux).
|
||||
if (!_isCalibrating)
|
||||
IconButton(
|
||||
icon: const Icon(Icons.refresh),
|
||||
onPressed: () => provider.analyzeImage(
|
||||
context.read<AnalysisProvider>().imagePath!,
|
||||
context.read<AnalysisProvider>().targetType!,
|
||||
),
|
||||
tooltip: 'Effacer tous les impacts',
|
||||
onPressed: () => provider.clearShots(),
|
||||
),
|
||||
// Nuage d'export vers le backend IA : visible uniquement si l'analyse
|
||||
// a réussi ET que l'utilisateur a activé l'option dans les Paramètres.
|
||||
if (!_isCalibrating && !_isSelectingReferences)
|
||||
if (!_isCalibrating)
|
||||
FutureBuilder<bool>(
|
||||
future: WalletIdentityService().isUploadEnabled(),
|
||||
builder: (context, snapshot) {
|
||||
@@ -470,8 +465,6 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
targetCenterX: provider.targetCenterX,
|
||||
targetCenterY: provider.targetCenterY,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
_buildActionButtons(context, provider),
|
||||
const SizedBox(height: 50),
|
||||
],
|
||||
),
|
||||
@@ -647,10 +640,6 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildActionButtons(BuildContext context, AnalysisProvider provider) {
|
||||
return const Column(children: [Row(children: [])]);
|
||||
}
|
||||
|
||||
void _showShotDetails(
|
||||
BuildContext context,
|
||||
AnalysisProvider provider,
|
||||
|
||||
Reference in New Issue
Block a user