diff --git a/lib/flutter_xlider.dart b/lib/flutter_xlider.dart index 8ad878c..6c5a99d 100644 --- a/lib/flutter_xlider.dart +++ b/lib/flutter_xlider.dart @@ -282,7 +282,7 @@ class _FlutterSliderState extends State layoutWidth = 0; } __containerSizeWithoutPadding = _containerHeightWithoutPadding; - _containerWidth = [(sliderProperSize * 2), layoutWidth].reduce(max); + _containerWidth = [(sliderProperSize * 2), layoutWidth].reduce(min); _containerHeight = constraints.maxHeight; } else { double layoutHeight = constraints.maxHeight; @@ -291,7 +291,7 @@ class _FlutterSliderState extends State } _containerWidth = constraints.maxWidth; _containerHeight = - [(sliderProperSize * 2), layoutHeight].reduce(max); + [(sliderProperSize * 2), layoutHeight].reduce(min); __containerSizeWithoutPadding = _containerWidthWithoutPadding; }