我正在开发一个Ffltter Web应用程序,并且我已经使用了一个Dropdown Button小部件作为我网站的顶部菜单.如何在鼠标悬停时打开下拉按钮.下面是我的下拉按钮
DropdownButton(
value: teachingsDropdownValue,
icon: SizedBox.shrink(),
focusColor: Colors.white,
elevation: 0,
onTap: (){},
underline: Container(
height: 2,
color: Colors.white,
),
items: teachingsItems.map((String items) {
return DropdownMenuItem(
value: items,
child: Text(items,textAlign: TextAlign.center,),
);
}).toList(),
onChanged: (String? newValue) {
setState(() {
// teachingsDropdownValue = newValue!;
if(newValue == "Salivation"){
Navigator.of(context).push(MaterialPageRoute(builder: (context) => TeachingsSalivationScreen()));
}
});
},
),