I need to show handicon when hover over the menu items.I tried with SystemMouseCursors.click
but it didn't works.It still show cursor
void showPopUpMenuAtTap(BuildContext context, TapDownDetails details,controller) {
showMenu(
context: context,
position: RelativeRect.fromLTRB(
details.globalPosition.dx,
details.globalPosition.dy,
details.globalPosition.dx,
details.globalPosition.dy,
), items: [
PopupMenuItem<String>(
mouseCursor: SystemMouseCursors.click,
padding: EdgeInsets.zero,
child: ListTile(
minLeadingWidth : 10,
leading:SvgPicture.asset(Images.deleteGreyIcon), // your icon
title: Text("Delete"),
), value: '1'),
PopupMenuItem<String>(
mouseCursor:MouseCursor.uncontrolled,
paddin开发者_StackOverflow中文版g: EdgeInsets.zero,
child: ListTile(
minLeadingWidth : 10,
leading: SvgPicture.asset(Images.editIcon), // your icon
title: Text("Rename"),
), value: '2'),
],
elevation: 3.0,).then((value) {
if (value == null) return;
if(value == "1"){
}else if(value == "2"){
}
});
}
Wrap the ListTile with MouseRegion:
MouseRegion(
cursor: SystemMouseCursors.click,
child: ListTile(...),
),
精彩评论