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

counter_button 封面
套件詳情v1.0.1

counter_button

計數器按鈕是 Flutter 庫,可讓您在增加或減少計數器值時建立帶有動畫效果的按鈕。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
270
喜歡數
31
Pub 分數
160

安裝套件

flutter pub add counter_button

套件介紹

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

Counter Button 是一個 Flutter 庫,提供了一個用於遞增和遞減計數器值的動畫按鈕。它在狀態變更時提供流暢的視覺反饋,增強了使用者互動體驗,非常適合用於數值輸入控制項。此套件支援多種平台,包括 Android、iOS、Web、macOS、Windows 和 Linux。透過 `flutter pub add counter_button` 進行簡單設定,開發者可輕鬆將動畫計數器整合至應用程式中。其輕量級設計專注於效能與易用性。

適用情境

  • 互動式數字輸入
  • 遊戲化元素
  • 購物車數量控制
  • 表單欄位調整
  • 狀態更改的UI回饋

主要特色

  • 動畫計數器過渡
  • 跨平台相容性
  • 與 pubspec.yaml 的簡單整合
  • 可自訂外觀
  • 狀態變更時的流暢 UI 反饋

適合對象

  • 尋求動畫計數器的開發者
  • 需要互動式數字輸入的應用程式
  • 專注於微互動的UI設計師
  • 初學者Flutter專案
  • 針對多個平台的專案

使用建議

  • 僅限基本計數功能
  • 無內建驗證或邊界檢查
  • 依賴外部動畫程式庫
  • 可能需要額外的樣式設定以實現複雜設計
  • 未優化前,不適合高頻率更新

原始 README

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

counter_button

pub package GitHub stars GitHub forks GitHub license GitHub issues

Counter Button is a flutter library that allows you to create a button with animation effects when you increase or decrease the counter value.

Screenshots

Demo Loading demo

Installing

dependencies:
  counter_button: ^1.0.1
Import
import 'package:counter_button/counter_button.dart';

How To Use

CounterButton(
  loading: false,
  onChange: (int val) {
    setState(() {
      _counterValue = val;
    });
  },
  count: _counterValue,
  countColor: Colors.purple,
  buttonColor: Colors.purpleAccent,
  progressColor: Colors.purpleAccent,
)

parameters

parameter description default
count Value of the counter
countColor Color of the counter Colors.black
onChange Value change callback when the buttons are pressed
loading For showing the linear progress indicator
progressColor Color of the progress indicator Colors.black
buttonColor Color of the icon button Colors.black
addIcon Add button icon
removeIcon Remove button icon const Icon(Icons.remove)

Bugs & Requests

If you encounter any bugs feel free to open an issue. Raise a ticket on github for suggestions. Pull request are also welcome.

Flutter

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

License

MIT License

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。