【发布时间】:2022-01-24 03:35:53
【问题描述】:
当孩子是 Chip 小部件时,我的 Flutter Web 程序中的鼠标光标不会变为悬停时的单击光标。我将 Chip 更改为 Text 和 Container 小部件,鼠标光标更改没有任何问题。
下面是 MouseRegion 的代码。
return MouseRegion(
cursor: SystemMouseCursors.click,
child: Container(
width: 200,
alignment: Alignment.centerRight,
child: GestureDetector(
onTap: () {},
child: Chip(
backgroundColor: kLightPrimary,
avatar: const Icon(
Feather.phone_call,
size: 18.0,
color: kPrimaryColor,
),
label: Text(
"Test num",
style: GoogleFonts.poppins(
fontWeight: FontWeight.w500, color: kPrimaryColor),
textAlign: TextAlign.end,
),
padding: const EdgeInsets.all(kDefaultPadding),
),
),
),
),
【问题讨论】:
标签: flutter dart flutter-web