Skip to content

Commit

Permalink
Merge branch 'hotfix/1.0.3'
Browse files Browse the repository at this point in the history
* hotfix/1.0.3:
  Update version
  Docs: Edit README.md
  Docs: Add image
  Revert "Delete setState in handleGesture method"
  • Loading branch information
seosh817 committed Oct 6, 2022
2 parents 6b9a6ab + 6e42dc5 commit cf73ef6
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ reformat dart code and edit README.md

## 1.0.2

Fix bug: Fix progress not updated bug
Fix bug: Fix progress not updated bug

## 1.0.3

- Fix bug: Fix progress not updated bug
- Add animation description
47 changes: 46 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
- [Gradient SeekBar](#2-gradient-seekbar)
- [Dashed SeekBar](#3-dashed-seekbar)
- [Add ValueNotifier](#4-add-valuenotifier)
- [Animations](#5-animations)
- [Installing](#installing)
- [Depend on it](#1-depend-on-it)
- [Install it](#2-install-it)
Expand Down Expand Up @@ -199,6 +200,50 @@ CircularSeekBar(
)
```

### 5. Animations

<img src="https://github.com/seosh817/Flutter_CircularSeekBar/blob/hotfix/1.0.3/images/animations_bounceOut.gif?raw=true" width="300"/>


### Dart code:

Various animations can be applied to the SeekBar by changing the `curves` property.

```dart
CircularSeekBar(
width: double.infinity,
height: 250,
progress: _progress,
barWidth: 8,
startAngle: 45,
sweepAngle: 270,
strokeCap: StrokeCap.butt,
progressGradientColors: const [Colors.red, Colors.orange, Colors.yellow, Colors.green, Colors.blue, Colors.indigo, Colors.purple],
innerThumbRadius: 5,
innerThumbStrokeWidth: 3,
innerThumbColor: Colors.white,
outerThumbRadius: 5,
outerThumbStrokeWidth: 10,
outerThumbColor: Colors.blueAccent,
dashWidth: 1,
dashGap: 2,
animation: true,
curves: Curves.bounceOut,
valueNotifier: _valueNotifier,
child: Center(
child: ValueListenableBuilder(
valueListenable: _valueNotifier,
builder: (_, double value, __) => Column(
mainAxisSize: MainAxisSize.min,
children: [
Text('${value.round()}', style: kNotoSansBold16.copyWith(color: Colors.white)),
Text('progress', style: kNotoSansRegular14.copyWith(color: Colors.grey)),
],
)),
),
)
```

# Installing

### 1. Depend on it
Expand All @@ -207,7 +252,7 @@ Add this to your package's `pubspec.yaml` file:

```yaml
dependencies:
circular_seek_bar: ^1.0.2
circular_seek_bar: ^1.0.3
```
or
Expand Down
Binary file added images/animations_bounceOut.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions lib/circular_seek_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ class _CircularSeekBarState extends State<CircularSeekBar> {
: _angleToProgress(angle > 0 ? angle : angle + 360, widget.startAngle,
widget.sweepAngle);
if (progress >= widget.minProgress && progress <= widget.maxProgress) {
setState(() {
_progress = progress;
});
}
}

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: circular_seek_bar
description: Circular seek bar package for flutter that supports customizable animations, dashes, and gradients.
version: 1.0.2
version: 1.0.3
repository: https://github.com/seosh817/Flutter_CircularSeekBar

environment:
Expand Down

0 comments on commit cf73ef6

Please sign in to comment.