action_slider
v0.7.0A slider to confirm actions and provide feedback on the success of these after subsequent loading.
Архив пакета: https://pubdev.letsnova.ru/api/archives/action_slider/0.7.0.tar.gz
dart pub add action_sliderREADME
If you like this package, please leave a like there on pub.dev and star on GitHub.
A slider to confirm actions and provide feedback on the success of these after subsequent loading.
LTR and RTL are both supported.
For a switch with a similar look, you can check out animated_toggle_switch.
Examples
ActionSlider.standard() with SliderBehavior.stretch
ActionSlider.standard() with TextDirection.rtl
ActionSlider.dual()
ActionSlider.standard() with rolling = true
ActionSlider.standard() with SliderBehavior.stretch and rolling = true
You can build your own sliders with ActionSlider.custom()
Easy Usage
Easy to use and highly customizable.
ActionSlider.standard(
child: const Text('Slide to confirm'),
action: (controller) async {
controller.loading(); //starts loading animation
await Future.delayed(const Duration(seconds: 3));
controller.success(); //starts success animation
},
... //many more parameters
)
Maximum customizability with ActionSlider.custom.
ActionSlider.custom(
foregroundBuilder: (context, state, child) => ...,
backgroundBuilder: (context, state, child) => ...,
outerBackgroundBuilder: (context, state, child) => ...,
action: (controller) => ...,
... //many more parameters
)
История изменений
0.7.0 [2023-07-30]
- BREAKING: increases minimum SDK to 2.17
- BREAKING: changes default background color from
ThemeData.backgroundColortoThemeData.cardColor - BREAKING: changes state type of
ActionSliderControllerfromSliderModetoActionSliderControllerState - adds
anchorPositionandallowedIntervaltoActionSliderController - adds
anchorPositionandallowedIntervaltoSliderState - adds
ActionSliderController.dual - closes #6
0.6.1 [2022-12-09]
- adds support for
RTL - adds
directionto constructors
0.6.0 [2022-07-05]
- minor fixes
- fixes #1
- BREAKING: renames
onSlidetoactioninActionSlider.standard
0.5.0 [2022-03-17]
- adds
stateChangeCallback,actionThresholdandactionThresholdType - BREAKING: renames
onSlidetoaction - BREAKING: renames
SlideCallbacktoAction
0.4.0 [2022-03-17]
- major customizability improvements
- adds
outerBackgroundBuilderandouterBackgroundChildto constructorActionSlider.custom - adds
crossFadeDuration,customBackgroundBuilder,customBackgroundBuilderChild,customOuterBackgroundBuilderandcustomOuterBackgroundBuilderChildto constructorActionSlider.standard - BREAKING: renames
SlidingState.loadingtoSlidingState.compact - BREAKING: renames
CrossFadetoSliderCrossFade - BREAKING change for constructor
ActionSlider.standard:- removes
circleRadiusand addsborderWidthinstead
- removes
- BREAKING change for constructor
ActionSlider.custom:- removes
toggleHeightand addstoggleMargininstead
- removes
0.3.0 [2022-03-12]
- adds
onTapparameter - adds jump method to
ActionSliderController - minor gesture detection improvements
0.2.1 [2022-02-28]
- changes README.md
0.2.0 [2022-02-28]
- BREAKING: changes parameters of
ForegroundBuilderandBackgroundBuilder - adds
SliderBehaviour.stretch
0.1.2 [2022-02-25]
- BREAKING: changes parameters of
SlideCallback - optimizes fade animation
0.1.1 [2022-02-21]
- fixes README.md
0.1.0 [2022-02-21]
- initial release
