Skip to content

Commit

Permalink
Fix containerWidth calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
fdietze authored Apr 8, 2021
1 parent 43c1e0f commit 13b5ece
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/flutter_xlider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ class _FlutterSliderState extends State<FlutterSlider>
layoutWidth = 0;
}
__containerSizeWithoutPadding = _containerHeightWithoutPadding;
_containerWidth = [(sliderProperSize * 2), layoutWidth].reduce(max);
_containerWidth = [(sliderProperSize * 2), layoutWidth].reduce(min);
_containerHeight = constraints.maxHeight;
} else {
double layoutHeight = constraints.maxHeight;
Expand All @@ -291,7 +291,7 @@ class _FlutterSliderState extends State<FlutterSlider>
}
_containerWidth = constraints.maxWidth;
_containerHeight =
[(sliderProperSize * 2), layoutHeight].reduce(max);
[(sliderProperSize * 2), layoutHeight].reduce(min);
__containerSizeWithoutPadding = _containerWidthWithoutPadding;
}

Expand Down

0 comments on commit 13b5ece

Please sign in to comment.