FLUTTER ECOSYSTEM

splashbyte/action_slider

アクションの確認と、その後の読み込み後にそれらの成功に関するフィードバックを提供するためのFlutterスライダー。

action_slider のプロジェクト画像
Stars
44
Forks
13
最終プッシュ(UTC)
2025/01/19
プロジェクト状態
公開中
SplashByte GitHub avatar
GITHUB Organization

SplashByte ↗

Germany
言語DartHTMLSwiftKotlinObjective-C

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 4 件
  • flutter{"sdk":"flutter"}
  • flutter_test開発用{"sdk":"flutter"}
  • flutter_lints開発用^4.0.0
  • dartdoc開発用^8.0.13

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

README を開く / 閉じる

pub.dev github likes downloads pub points license buy me a coffee

If you like this package, please leave a like there on pub.dev and star on GitHub.

A fully customizable slider to confirm actions and provide feedback on the success. It supports different states like loading, success and failure.

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
action_slider_example_snake
action_slider_example_expanded

ActionSlider.dual()
action_slider_example_dual
action_slider_example_dual_customized

ActionSlider.standard() with TextDirection.rtl
action_slider_example_rtl

ActionSlider.standard() with SliderIconAnimation.roll
action_slider_example_rolling

ActionSlider.standard() with SliderBehavior.stretch and SliderIconAnimation.roll
action_slider_example_rolling_snake

You can build your own sliders with ActionSlider.custom()
action_slider_example_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
)

Two directions with ActionSlider.dual

ActionSlider.dual(
    child: const Text('Slide to confirm'),
    startAction: (controller) async {
        controller.success(expanded: true, side: SliderSide.start); //starts success animation with an expanded slider
    },
    endAction: (controller) async {
        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
)