Merge remote-tracking branch 'refs/remotes/origin/prep-v-1.2.0' into prep-v0.2.0

codemagic-setup
Hank Grabowski 2023-03-14 23:09:26 -04:00
commit 2660316235
1 zmienionych plików z 29 dodań i 13 usunięć

Wyświetl plik

@ -71,19 +71,35 @@ class _HomeScreenState extends State<HomeScreen> {
title: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
DropdownButton<TimelineType>(
value: currentType,
items: types
.map((e) => DropdownMenuItem<TimelineType>(
value: e,
child: Text(e.toLabel()),
))
.toList(),
onChanged: (value) {
setState(() {
currentType = value!;
});
}),
if (currentType == TimelineType.group)
PopupMenuButton<TimelineType>(
initialValue: currentType,
// Callback that sets the selected popup menu item.
onSelected: (value) {
setState(() {
currentType = value;
});
},
itemBuilder: (BuildContext context) => types
.map((e) => PopupMenuItem<TimelineType>(
value: e,
child: Text(e.toLabel()),
))
.toList()),
if (currentType != TimelineType.group)
DropdownButton<TimelineType>(
value: currentType,
items: types
.map((e) => DropdownMenuItem<TimelineType>(
value: e,
child: Text(e.toLabel()),
))
.toList(),
onChanged: (value) {
setState(() {
currentType = value!;
});
}),
const HorizontalPadding(
width: 5.0,
),