搜尋套件、儲存庫與 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.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。