From 311c41e46f46e001f6d5b9ff3c5832e5c4192fcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Azevedo?= Date: Sat, 10 Dec 2022 15:59:55 -0300 Subject: [PATCH] fix: delete old commented code and format `tooltipWidget` --- lib/another_xlider.dart | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/lib/another_xlider.dart b/lib/another_xlider.dart index 5cf325e..a32cd0b 100644 --- a/lib/another_xlider.dart +++ b/lib/another_xlider.dart @@ -2025,25 +2025,24 @@ class FlutterSliderState extends State } Widget tooltipWidget = IgnorePointer( - child: Center( - child: FittedBox( - child: Container( -// height: , -// height: __tooltipKEY.currentContext.size.height, - key: (side == 'left') ? leftTooltipKey : rightTooltipKey, -// alignment: Alignment.center, - child: (widget.tooltip != null && widget.tooltip!.custom != null) - ? widget.tooltip!.custom!(value) - : Container( - padding: const EdgeInsets.all(8), - decoration: _tooltipData.boxStyle!.decoration, - foregroundDecoration: - _tooltipData.boxStyle!.foregroundDecoration, - transform: _tooltipData.boxStyle!.transform, - child: tooltipHolderWidget), + child: Center( + child: FittedBox( + child: Container( + key: (side == 'left') ? leftTooltipKey : rightTooltipKey, + child: (widget.tooltip != null && widget.tooltip!.custom != null) + ? widget.tooltip!.custom!(value) + : Container( + padding: const EdgeInsets.all(8), + decoration: _tooltipData.boxStyle!.decoration, + foregroundDecoration: + _tooltipData.boxStyle!.foregroundDecoration, + transform: _tooltipData.boxStyle!.transform, + child: tooltipHolderWidget, + ), + ), ), ), - )); + ); double? top, right, bottom, left; switch (_tooltipData.direction) {