Skip to content

Commit

Permalink
Fix containerWidth calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
fdietze committed May 26, 2021
1 parent ef4a358 commit ad9da4d
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 @@ -273,7 +273,7 @@ class _FlutterSliderState extends State<FlutterSlider>
}
__containerSizeWithoutPadding = _containerHeightWithoutPadding;
_containerWidth =
[(sliderProperSize! * 2), layoutWidth].reduce(max);
[(sliderProperSize! * 2), layoutWidth].reduce(min);
_containerHeight = constraints.maxHeight;
} else {
double layoutHeight = constraints.maxHeight;
Expand All @@ -282,7 +282,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 ad9da4d

Please sign in to comment.