let AI comment everything because well... yeah...

This commit is contained in:
Nico
2025-06-06 21:00:32 +02:00
parent 9c84d0c375
commit cc110ac104
44 changed files with 1230 additions and 646 deletions

View File

@@ -1,8 +1,26 @@
// * Widget for selecting camera trap placement type
// * Features:
// * - Multiple placement options via radio buttons
// * - Localized labels for each placement type
// * - Support for initial selection
// * Available placement types:
// * - Bait station (Kirrung)
// * - Water source (Wasserstelle)
// * - Forest (Wald)
// * - Game pass (Wildwechsel)
// * - Path/Road (Weg/Straße)
// * - Farm/Garden (Hof/Garten)
// * - Meadow/Field (Wiese/Feld/Offenfläche)
import 'package:flutter/material.dart';
import 'package:fforte/l10n/app_localizations.dart';
/// Widget for selecting the type of location where the camera trap is placed
/// Provides various predefined placement options common in wildlife monitoring
class Platzung extends StatefulWidget {
/// Callback function when placement type selection changes
final Function(String) onPlatzungChanged;
/// Initial placement type selection
final String? initialPlatzung;
const Platzung({
@@ -15,7 +33,9 @@ class Platzung extends StatefulWidget {
State<Platzung> createState() => _PlatzungState();
}
/// State class for the placement type selection widget
class _PlatzungState extends State<Platzung> {
/// Currently selected placement type
String? _selectedPlatzung;
@override
@@ -30,6 +50,7 @@ class _PlatzungState extends State<Platzung> {
Widget build(BuildContext context) {
return Column(
children: [
// Bait station placement option
ListTile(
visualDensity: const VisualDensity(vertical: -4),
title: Text(AppLocalizations.of(context)!.kirrung),
@@ -44,6 +65,7 @@ class _PlatzungState extends State<Platzung> {
},
),
),
// Water source placement option
ListTile(
visualDensity: const VisualDensity(vertical: -4),
title: Text(AppLocalizations.of(context)!.wasserstelle),
@@ -58,6 +80,7 @@ class _PlatzungState extends State<Platzung> {
},
),
),
// Forest placement option
ListTile(
visualDensity: const VisualDensity(vertical: -4),
title: Text(AppLocalizations.of(context)!.wald),
@@ -72,6 +95,7 @@ class _PlatzungState extends State<Platzung> {
},
),
),
// Game pass placement option
ListTile(
visualDensity: const VisualDensity(vertical: -4),
title: Text(AppLocalizations.of(context)!.wildwechsel),
@@ -86,6 +110,7 @@ class _PlatzungState extends State<Platzung> {
},
),
),
// Path/Road placement option
ListTile(
visualDensity: const VisualDensity(vertical: -4),
title: Text(AppLocalizations.of(context)!.wegstrasse),
@@ -100,6 +125,7 @@ class _PlatzungState extends State<Platzung> {
},
),
),
// Farm/Garden placement option
ListTile(
visualDensity: const VisualDensity(vertical: -4),
title: Text(AppLocalizations.of(context)!.hofgarten),
@@ -114,6 +140,7 @@ class _PlatzungState extends State<Platzung> {
},
),
),
// Meadow/Field placement option
ListTile(
visualDensity: const VisualDensity(vertical: -4),
title: Text(AppLocalizations.of(context)!.wiesefeld),