搜索插件、代码仓与 APP 分类

stepper_a 封面
插件详情v1.4.0

stepper_a

StepperA 是一个简单且可靠的 Flutter 包,可实现 FormKey 验证,并轻松访问您自己的按钮点击控制。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
78
喜欢数
39
Pub 分数
160

安装插件

flutter pub add stepper_a

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

StepperA 是一个轻量级的 Flutter 包,旨在通过逐步工作流程简化表单导航。它能够无缝集成 FormKey 验证,并提供对按钮点击的直接控制,使开发者能够高效管理步骤之间的转换。该包专为跨平台可靠性设计,支持 Android、iOS、Web、macOS、Windows 和 Linux。该包通过在多步骤流程中提供可预测的状态管理来提升用户体验。

适合场景

  • 多步骤表单创建
  • 表单验证的顺序步骤
  • 向导中的自定义按钮控件
  • 跨平台步进器界面
  • 用户引导流程
  • 动态表单流程

主要特点

  • 内置 FormKey 验证
  • 直接按钮按下控制
  • 跨平台兼容性
  • 简单的 API 集成
  • 步骤的状态管理
  • 轻量且快速

适合对象

  • 开发人员构建向导
  • 需要表单验证的团队
  • 需要逐步输入的项目
  • 带有引导或结账流程的应用
  • Flutter 初学者寻找简单的步骤条解决方案

使用建议

  • 需要手动处理步骤状态
  • 有限的样式自定义
  • 无内置动画
  • 最适合基本的步进逻辑
  • 依赖于正确使用 FormKey
  • 不适合复杂的UI过渡

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Flutter StepperA

Key Features

Stepper A can easily build Stepper facility of you any flutter app.

  • Form Validation with FormKey [GlobalKey()]
  • Support Horizontal and Vertical Stepper
  • Customized Stepper step Shape [Rectangle, Circle,Diamond,Triangle]
  • Customized Stepper step border [Dash, Straight]
  • Customized Stepper line [Dash, Straight]
  • Smooth sliding with Animation
  • Number step text style provision added.
  • Stepper page swipe
  • Easily Customize Step [Image, IconData, or a fully custom widget builder]
  • Forward and previous button custom style .
  • Material 3 theming support via StepA.fromTheme(context)
  • Screen-reader friendly (Semantics labels on every step)
  • Jump directly to any step with StepperAController.jumpToStep()
  • Listen to step changes with the onStepChanged callback

package.yaml

stepper_a: <latest version>

Import

import 'package:stepper_a/stepper_a.dart';

Simple Example

 StepperA(
        stepperSize: const Size(300, 90),
        borderShape: BorderShape.rRect,
        borderType: BorderType.straight,
        stepperAxis: Axis.horizontal,
        lineType: LineType.dotted,
        stepperBackgroundColor: Colors.transparent,
        stepperAController: controller,
        stepHeight: 40,
        stepWidth: 40,
        stepBorder: true,
        pageSwipe: false,
        formValidation: true,
        previousButton: (int index) => StepperAButton(
            width: 90,
            height: 40,
            onTap: (int currentIndex){
            
            },
            buttonWidget: const Icon(
            Icons.arrow_back,
            color: Colors.white,
           ),
        ),
        forwardButton: (index) => StepperAButton(
            width: index == 0 ? 200 : 90,
            height: 40,
            onTap: (int currentIndex){
            
            },
            onComplete: (){
              debugPrint("Forward Button click complete step call back!");
            },
            buttonWidget: index == 3
            ? const Text('Complete', style: TextStyle(fontSize: 14, color: Colors.white))
                : const Text('Next', style: TextStyle(fontSize: 14, color: Colors.white)),
        ),
        customSteps: [
            const CustomSteps(stepsIcon: Icons.login, title: "LogIn"),
            const CustomSteps(stepsIcon: Icons.home, title: "Home"),
            const CustomSteps(stepsIcon: Icons.account_circle, title: "Account"),
            CustomSteps(image: Image.asset("assets/pic/pay.png",color: Colors.white,), title: "Payment"),
        ],
        step: const StepA(
            currentStepColor: Colors.green,
            completeStepColor: Colors.indigo,
            inactiveStepColor: Colors.black45,
            // loadingWidget: CircularProgressIndicator(color: Colors.green,),
            margin: EdgeInsets.all(5)
      ),
      stepperBodyWidget: [
            StepOne(controller: controller),
            StepTwo(controller: controller),
            StepThree(controller: controller),
            StepFour(controller: controller),
      ]
)

New in 1.4.0

Material 3 theming

Let the stepper pick up your app's ColorScheme automatically:

step: StepA.fromTheme(context),

Any color you still pass explicitly (e.g. StepA.fromTheme(context, currentStepColor: Colors.green)) overrides the theme default.

Jump to a step
controller.jumpToStep(
    index: 2,
    onTap: (currentIndex) {
      // currentIndex is now 2
    },
);
Listen for step changes
StepperA(
  // ...
  onStepChanged: (currentIndex) {
    debugPrint('Now on step $currentIndex');
  },
)
Fully custom step widget
CustomSteps(
  title: "Payment",
  builder: (context, index, isCompleted, isCurrent) => Icon(
    isCompleted ? Icons.check : Icons.payment,
    color: Colors.white,
  ),
)

ScreenShot

FormKey validation

Horizontal rectangle

Screenshot_20230602_233154

Custom Steps

vertical circle

Others

vertical circle

Horizontal circle

Horizontal rectangle

Support

If this package was useful to you, helped you to easily deliver your app, saved you a lot of time, or you just want to support the project, I would be grateful if you give us a rating.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。