搜尋套件、儲存庫與 APP 分類

cart_stepper 封面
套件詳情v4.3.0

cart_stepper

一個完全可自訂的 Flutter 小部件,用於取得計數。適用於電商應用中的購物車計數。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
717
喜歡數
69
Pub 分數
160

安裝套件

flutter pub add cart_stepper

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個完全可自訂的Flutter組件,專為管理與顯示項目數量而設計,非常適合電子商務應用。它讓使用者能透過平滑動畫增減數量,並支援按鈕、文字樣式及行為的自訂。此組件輕巧,可無縫整合至購物車或跨多個平台的產品數量選擇器中。

適用情境

  • 電子商務產品數量選擇
  • 購物車商品數量管理
  • 表單中的可自定義數值輸入
  • 移動和網頁庫存追蹤
  • 即時訂單更新

主要特色

  • 完全可自定義的外觀
  • 平滑的遞增/遞減動畫
  • 支援所有主要平台
  • 可設定的按鈕樣式和大小
  • 內建驗證與邊界控制
  • 與現有 UI 的輕鬆整合

適合對象

  • 開發電子商務應用的開發者
  • 需要互動式計數器的UI設計師
  • 跨平台行動與Web專案
  • 需要直覺數量輸入的應用程式

使用建議

  • 需要手動處理狀態管理
  • 內建驗證功能有限,僅限於範圍檢查
  • 未針對非常大的數字進行優化
  • 可能需要額外的樣式來支援複雜主題
  • 依賴外部相依性以實現進階功能

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

cart_stepper

pub package

A fully customizable Flutter Widget to get count. It can be applicable in e-commerce apps for getting cart count.

This package is Forked from AYNStepperView

Preview

Arguments

  • count: int/double, the number to show
  • stepper: int/double, the number to increasing or decreasing
  • size: double, widget size
  • axis: Axis, layout direction
  • numberSize: double, number spacer, default 2
  • didChangeCount: Function, @required to set the release counter
  • style: CartStepperStyle
  • alwaysExpanded: bool, always expanded while value is 0
  • elevation: double, display a shadow around this widget

CartStepperStyle:

  • activeForegroundColor: Color, text color when counter > 0
  • activeBackgroundColor: Color, background color when counter > 0
  • foregroundColor: Color, text color when counter == 0
  • backgroundColor: Color, background color when counter == 0
  • shape: BoxShape,
  • radius: Radius, the borderRadius of this widget, default caculating a roundedRectAngle
  • BoxBorder: Border of the Widget
  • shadowColor: Color
  • textStyle,
  • iconTheme = const IconThemeData(),
  • iconPlus: IconData, customize the plus icon
  • iconMinus: IconData, customize the minus icon
  • buttonAspectRatio: plus & minux button's aspectRatio, default 1,
  • elevation: Widget's elevation,

Using

Create a widget to show and modify a number:

Widget _buildStepper() {
  return CartStepperInt(
        count: _counter,
        size: 30,
        style: CartStepperTheme.of(context).copyWith(activeForegroundColor: Colors.purple,)
        didChangeCount: (count) {
        setState(() {
        _counter = count;
        });
      },
  );
}

Migrating

// from 3.x to 4.x
// CartStepperStyle.
deActiveForegroundColor => foregroundColor
deActiveBackgroundColor => backgroundColor

OnlineDemo

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。