Skip to content

Commit

Permalink
version 3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ali.azmoude@gmail.com authored and ali.azmoude@gmail.com committed May 7, 2020
1 parent 3a3976a commit 400e507
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,7 @@
* hatchmark lines and labels are separated and rewritten
* values setState bug fixed
* step is changed from double to `FlutterSliderStep` class

## [3.4.0] - 05/08/2020

* `decoration` and `foregroundDecoration` added to slider
12 changes: 7 additions & 5 deletions lib/flutter_xlider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class FlutterSlider extends StatefulWidget {
final bool centeredOrigin;
final bool lockHandlers;
final double lockDistance;
final BoxDecoration decoration;
final BoxDecoration foregroundDecoration;

FlutterSlider(
{this.key,
Expand Down Expand Up @@ -80,7 +82,9 @@ class FlutterSlider extends StatefulWidget {
this.hatchMark,
this.centeredOrigin = false,
this.lockHandlers = false,
this.lockDistance})
this.lockDistance,
this.decoration,
this.foregroundDecoration})
: assert(touchSize == null ||
(touchSize != null && (touchSize >= 5 && touchSize <= 50))),
assert(values != null),
Expand Down Expand Up @@ -318,6 +322,8 @@ class _FlutterSliderState extends State<FlutterSlider>
overflow: Overflow.visible,
children: drawHandlers(),
),
foregroundDecoration: widget.foregroundDecoration,
decoration: widget.decoration,
),
],
);
Expand Down Expand Up @@ -2249,10 +2255,6 @@ class _FlutterSliderState extends State<FlutterSlider>
}

return double.parse((value + _widgetMin).toStringAsFixed(_decimalScale));
// return (value + _widgetMin);
// if(_decimalScale > 0) {
// }
// return double.parse((value + _widgetMin).floor().toStringAsFixed(_decimalScale));
}

void _arrangeHandlersZIndex() {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_xlider
description: (Flutter Xlider) A material design slider and range slider, horizontal and vertical, with RTL support and lots of options and customizations for flutter
version: 3.4.0-dev.3
version: 3.4.0
homepage: https://github.com/Ali-Azmoud/flutter_xlider

environment:
Expand Down
Binary file added wiki-images/aloneinthedark.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wiki-images/dirtydial.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 400e507

Please sign in to comment.