Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wangyng/better_cupertino_slider
Advanced cupertino slider based on CupertinoSlider
https://github.com/wangyng/better_cupertino_slider
flutter slider
Last synced: 7 days ago
JSON representation
Advanced cupertino slider based on CupertinoSlider
- Host: GitHub
- URL: https://github.com/wangyng/better_cupertino_slider
- Owner: WangYng
- License: bsd-3-clause
- Created: 2021-03-31T07:32:37.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-14T07:19:29.000Z (over 3 years ago)
- Last Synced: 2024-12-20T19:32:51.264Z (about 1 month ago)
- Topics: flutter, slider
- Language: Dart
- Homepage:
- Size: 1.7 MB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# better_cupertino_slider
Advanced cupertino slider based on CupertinoSlider.
## Install Started
1. Add this to your **pubspec.yaml** file:
```yaml
dependencies:
better_cupertino_slider: ^1.0.0
```2. Install it
```bash
$ flutter packages get
```## Normal usage
```dart
BetterCupertinoSlider(
min: 0.0,
max: maxValue,
value: sliderValue,
configure: BetterCupertinoSliderConfigure(
trackHorizontalPadding: 8.0,
trackHeight: 4.0,
trackLeftColor: Colors.greenAccent,
trackRightColor: Colors.grey.withOpacity(0.3),
thumbRadius: 8.0,
thumbPainter: (canvas, rect){
final RRect rrect = RRect.fromRectAndRadius(
rect,
Radius.circular(rect.shortestSide / 2.0),
);
canvas.drawRRect(rrect, Paint()..color = Colors.red);
},
),
onChanged: (value) {
setState(() {
sliderValue = value;
});
},
),
```## Feature
- [x] custom track and thumb
- [x] step slider
- [x] as linear progress
- [x] tap gesture