'Flutter I don't know how to select 'enum' pages in drop down button
List<String> ilac_items = ["İlaçlar","İnsektisit", "Fungusit", "Herbisit"];
String? selectedIlacItem = "İlaçlar";
DropdownButton<String>(
icon: Icon(
Icons.arrow_drop_down,
color: _selectedPage == Page.ilac ? active : notActive,
),
value: selectedIlacItem,
items: ilac_items
.map((String item) => DropdownMenuItem<String>(
value: item,
child: Text(item,style: const TextStyle(color: AppColor.mainColor))))
.toList(),
onChanged: (item) => setState(() {
selectedIlacItem = item;
}),)
I want to sort the subcategory products under the category with the dropdown button, but I can select it in the drop down menu, but I don't know how to bring the page, can you help?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
