我有抖动下拉选择列表:
为
SELECT orders.quantity * products.price as total
to_char(orders.quantity * products.price, '$99,999,999.99') AS money,
FROM
orders
inner join products on products.id = orders.products_id
inner join customers on customers.id = orders.customers_id WHERE order_date BETWEEN CURRENT_DATE - INTERVAL '30 days'
AND CURRENT_DATE + INTERVAL '1 days'
GROUP BY money
如果我取消清除ListTile(
leading: const Icon(Icons.local_shipping),
title: DropdownButton<String>(
value: serviceProvider,
// hint: const Text('Select Service Provider'),
onChanged: (String newValue) {
setState(() {
serviceProvider = newValue;
});
},
items: <Map>[{"id":"1","business_name":'Business Name 1'}, {"id":"3","business_name":'Business Name 3'}, {"id":"6","business_name":'Business Name 6'}, {"id":"5","business_name":'Business Name 5'}].map<DropdownMenuItem<String>>((Map value) {
return DropdownMenuItem<String>(
value: value['id'],
child: Text(value['business_name']),
);
}).toList(),
),
),
,它将正常工作。但是从列表中选择一项后,该项就不会在那里存在。
我无法弄清楚代码中缺少什么,
谢谢 “)