Skip to content

Commit

Permalink
fix: 🐛Fixed cursor not changing to click mode issue (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sahil-Simform committed Feb 26, 2025
1 parent ea99366 commit 15c764f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 28 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
- Feature [#500](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/500) -
Added `onDismiss` callback in `ShowCaseWidget` which will trigger whenever `onDismiss` method is
called
- Fixed [#503](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/503) - Cursor
not changing to click mode when it is hovering over the default action widgets.

## [4.0.1]
- Fixed [#493](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/493) - ShowCase.withWidget not showing issue
Expand Down
59 changes: 31 additions & 28 deletions lib/src/tooltip_action_button_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,38 @@ class TooltipActionButtonWidget extends StatelessWidget {
final theme = Theme.of(context);

return config.button ??
GestureDetector(
onTap: handleOnTap,
child: Container(
padding: config.padding,
decoration: BoxDecoration(
color: config.backgroundColor ?? theme.primaryColor,
borderRadius: config.borderRadius,
border: config.border,
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
if (config.leadIcon != null)
Padding(
padding: config.leadIcon?.padding ??
const EdgeInsets.only(right: 5),
child: config.leadIcon?.icon,
),
Text(
config.name ?? config.type?.actionName ?? '',
style: config.textStyle,
),
if (config.tailIcon != null)
Padding(
padding: config.tailIcon?.padding ??
const EdgeInsets.only(left: 5),
child: config.tailIcon?.icon,
MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: handleOnTap,
child: Container(
padding: config.padding,
decoration: BoxDecoration(
color: config.backgroundColor ?? theme.primaryColor,
borderRadius: config.borderRadius,
border: config.border,
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
if (config.leadIcon != null)
Padding(
padding: config.leadIcon?.padding ??
const EdgeInsets.only(right: 5),
child: config.leadIcon?.icon,
),
Text(
config.name ?? config.type?.actionName ?? '',
style: config.textStyle,
),
],
if (config.tailIcon != null)
Padding(
padding: config.tailIcon?.padding ??
const EdgeInsets.only(left: 5),
child: config.tailIcon?.icon,
),
],
),
),
),
);
Expand Down

0 comments on commit 15c764f

Please sign in to comment.