Reputation: 11
This is for flutter web. I have a widget which I wrapped in IgnorePointer() so that my MouseRegion(cursor: SystemMouseCursors.click,) would work for Text() widgets. Without IgnorePointer() ,hovering on text widgets would show a Ibeam cursor. Now, I have a child which is nested like 20 widgets more in the widget tree which need to be clicked on to open some page. Using IgnorePointer() as a super-parent makes this not possible . Is there a way to make it clickable?
child: GestureDetector(
onTap: onCardTap,
child: MouseRegion(
cursor: SystemMouseCursors.click,
child: Center(
child: Container(
**Insert hundred of lines of Code**
child: **IconButton(
icon: const Icon(
Remix.information_line,
color: AppColors.neutral60,
),
onPressed: () async {
await showDialog(
context: context,
barrierDismissible: false,
builder: (context) => _PriceRatingDialog(
title,
price,
priceAssessment,
mobileDeLink ?? '',
),
);
},
),**
),
),
)
So the Gestion detector of the icon button now cant be used .Is there a Workaround? What i tried : Wrapping each other element in MouseRegion() which is a bad solution because those single elements are used in many places in my application. So wrapping the parent is a must to avoid conflict and bad behaviour(showing "click" cursor where it should not) in other pages in my website.
Upvotes: 0
Views: 49