Skip to content

Commit

Permalink
Dart format
Browse files Browse the repository at this point in the history
  • Loading branch information
WinXaito committed Mar 29, 2023
1 parent b096e18 commit 3df8e2c
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions lib/src/controls/utils/hover_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,20 @@ class _HoverButtonState extends State<HoverButton> {
if (mounted) setState(() => _pressing = false);
},
onLongPress: enabled ? widget.onLongPress : null,
onLongPressStart: widget.onLongPressStart != null ? (_) {
if (!enabled) return;
widget.onLongPressStart?.call();
if (mounted) setState(() => _pressing = true);
} : null,
onLongPressEnd: widget.onLongPressEnd != null ? (_) {
if (!enabled) return;
widget.onLongPressEnd?.call();
if (mounted) setState(() => _pressing = false);
} : null,
onLongPressStart: widget.onLongPressStart != null
? (_) {
if (!enabled) return;
widget.onLongPressStart?.call();
if (mounted) setState(() => _pressing = true);
}
: null,
onLongPressEnd: widget.onLongPressEnd != null
? (_) {
if (!enabled) return;
widget.onLongPressEnd?.call();
if (mounted) setState(() => _pressing = false);
}
: null,
onHorizontalDragStart: widget.onHorizontalDragStart,
onHorizontalDragUpdate: widget.onHorizontalDragUpdate,
onHorizontalDragEnd: widget.onHorizontalDragEnd,
Expand Down

0 comments on commit 3df8e2c

Please sign in to comment.