fixed alignment in anzahlen, added and finished 3rd step created hinweise widget, removed domain, changed letzter_niederschlag.dart to Dropdown
time
This commit is contained in:
@@ -11,34 +11,47 @@ class LetzterNiederschlag extends StatefulWidget {
|
||||
}
|
||||
|
||||
class LetzterNiederschlagState extends State<LetzterNiederschlag> {
|
||||
String? selectedValue; // Variable für den ausgewählten Wert
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DropdownMenu<String>(
|
||||
controller: widget.controller,
|
||||
label: Text(AppLocalizations.of(context)!.letzterNiederschlag),
|
||||
requestFocusOnTap: true,
|
||||
dropdownMenuEntries: [
|
||||
DropdownMenuEntry(
|
||||
value: "aktuell",
|
||||
label: AppLocalizations.of(context)!.aktuell),
|
||||
DropdownMenuEntry(
|
||||
value: "selberMorgen",
|
||||
label: AppLocalizations.of(context)!.selberMorgen),
|
||||
DropdownMenuEntry(
|
||||
value: "nacht",
|
||||
label: AppLocalizations.of(context)!.nacht),
|
||||
DropdownMenuEntry(
|
||||
value: "vortag",
|
||||
label: AppLocalizations.of(context)!.vortag),
|
||||
DropdownMenuEntry(
|
||||
value: "vor23Tagen",
|
||||
label: AppLocalizations.of(context)!.vor23Tagen),
|
||||
DropdownMenuEntry(
|
||||
value: "vor46Tagen",
|
||||
label: AppLocalizations.of(context)!.vor46Tagen),
|
||||
DropdownMenuEntry(
|
||||
value: "vor1Woche",
|
||||
label: AppLocalizations.of(context)!.vor1Woche)
|
||||
return DropdownButton<String>(
|
||||
isExpanded: true,
|
||||
value: selectedValue,
|
||||
hint: Text(AppLocalizations.of(context)!.letzterNiederschlag),
|
||||
onChanged: (String? newValue) {
|
||||
setState(() {
|
||||
selectedValue = newValue; // Aktualisiere den ausgewählten Wert
|
||||
});
|
||||
},
|
||||
items: [
|
||||
DropdownMenuItem<String>(
|
||||
value: "aktuell",
|
||||
child: Text(AppLocalizations.of(context)!.aktuell),
|
||||
),
|
||||
DropdownMenuItem<String>(
|
||||
value: "selberMorgen",
|
||||
child: Text(AppLocalizations.of(context)!.selberMorgen),
|
||||
),
|
||||
DropdownMenuItem<String>(
|
||||
value: "nacht",
|
||||
child: Text(AppLocalizations.of(context)!.nacht),
|
||||
),
|
||||
DropdownMenuItem<String>(
|
||||
value: "vortag",
|
||||
child: Text(AppLocalizations.of(context)!.vortag),
|
||||
),
|
||||
DropdownMenuItem<String>(
|
||||
value: "vor23Tagen",
|
||||
child: Text(AppLocalizations.of(context)!.vor23Tagen),
|
||||
),
|
||||
DropdownMenuItem<String>(
|
||||
value: "vor46Tagen",
|
||||
child: Text(AppLocalizations.of(context)!.vor46Tagen),
|
||||
),
|
||||
DropdownMenuItem<String>(
|
||||
value: "vor1Woche",
|
||||
child: Text(AppLocalizations.of(context)!.vor1Woche),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user