Skip to content

Commit

Permalink
version 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
maeddin committed Mar 17, 2022
1 parent b20a61b commit 15ad149
Show file tree
Hide file tree
Showing 5 changed files with 219 additions and 96 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.5.0 [2022-03-17]
- adds `stateChangeCallback`, `actionThreshold` and `actionThresholdType`
- BREAKING: renames `onSlide` to `action`
- BREAKING: renames `SlideCallback` to `Action`

## 0.4.0 [2022-03-17]
- major customizability improvements
- adds `outerBackgroundBuilder` and `outerBackgroundChild` to constructor `ActionSlider.custom`
Expand Down
9 changes: 5 additions & 4 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class _MyHomePageState extends State<MyHomePage> {
children: <Widget>[
ActionSlider.standard(
width: 300.0,
actionThresholdType: ThresholdType.release,
child: const Text('Slide to confirm'),
onSlide: (controller) async {
controller.loading(); //starts loading animation
Expand Down Expand Up @@ -141,12 +142,12 @@ class _MyHomePageState extends State<MyHomePage> {
style: theme.textTheme.subtitle1)),
),
backgroundBorderRadius: BorderRadius.circular(5.0),
onSlide: (controller) async {
action: (controller) async {
controller.loading(); //starts loading animation
await Future.delayed(const Duration(seconds: 3));
controller.success(); //starts success animation
await Future.delayed(const Duration(seconds: 1));
controller.reset(); //resets the slidere slider
controller.reset(); //resets the slider
},
),
const SizedBox(height: 24.0),
Expand Down Expand Up @@ -174,12 +175,12 @@ class _MyHomePageState extends State<MyHomePage> {
minHeight: state.toggleSize.height,
child: child!)),
backgroundBorderRadius: BorderRadius.circular(5.0),
onSlide: (controller) async {
action: (controller) async {
controller.loading(); //starts loading animation
await Future.delayed(const Duration(seconds: 3));
controller.success(); //starts success animation
await Future.delayed(const Duration(seconds: 1));
controller.reset(); //resets the slideretting the slider
controller.reset(); //resets the slider
},
)
],
Expand Down
Loading

0 comments on commit 15ad149

Please sign in to comment.