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

GitHub 代码仓shirne/CartStepper

CartStepper

一个 Flutter 数字步进输入框

CartStepper 项目封面
星标
12
复刻
13
最近推送(UTC)
2023年12月22日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

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

shirne GitHub avatar
GitHub 作者

shirne ↗

Flutter/PHP/Java/.NET/Vue

语辰软件中国广东惠州官方网站 ↗
语言DartC++CMakeHTMLSwiftCKotlinObjective-C

分类

此仓库发布的插件

使用的依赖

依赖清单 4 项

  • flutter{"sdk":"flutter"}
  • intl>=0.17.0
  • flutter_test开发依赖{"sdk":"flutter"}
  • flutter_lints开发依赖any

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗