more filter

puuuuush
This commit is contained in:
Ali
2025-01-15 19:24:41 +01:00
parent 61e4416879
commit a45527845f
3 changed files with 19 additions and 23 deletions
+10 -19
View File
@@ -56,33 +56,24 @@ class PageDashboard extends StatelessWidget {
isDense: true,
isExpanded: true,
items: [
DropdownMenuItem(
value: 1,
child: Center(
child: Text("Heute", style: TextStyle(color: Theme.of(context).colorScheme.onSecondary)),
),
),
DropdownMenuItem(
value: 2,
child: Center(
child: Text("Letzte 7 Tage"),
),
),
for (var key in Provider.of<TimeProvider>(context, listen: false).timeList.entries)
DropdownMenuItem(
value: key.key,
child: Center(
child: Text(key.value, style: TextStyle(color: Theme.of(context).colorScheme.onSecondary)),
),
),
],
selectedItemBuilder: (BuildContext context) {
return [
for (var key in Provider.of<TimeProvider>(context, listen: false).timeList.entries)
Center(
child: Text(
"Heute",
key.value,
style: TextStyle(color: Theme.of(context).colorScheme.onPrimary), // Benutzerdefinierte Farbe für angezeigten Text
),
),
Center(
child: Text(
"Letzte 7 Tage",
style: TextStyle(color: Theme.of(context).colorScheme.onPrimary), // Benutzerdefinierte Farbe für angezeigten Text
)
),
];
},
onChanged: (value) {