FLUTTER ECOSYSTEM

shirne/CartStepper

Uma entrada numérica de passo do Flutter

Capa do projeto CartStepper
Stars
12
Forks
13
Último push (UTC)
22 de dez. de 2023
Status do projeto
Ativo
shirne GitHub avatar
GITHUB User

shirne ↗

Flutter/PHP/Java/.NET/Vue

语辰软件中国广东惠州Site oficial ↗
LinguagensDartC++CMakeHTMLSwiftCKotlinObjective-C

Tópicos técnicos

Pacotes publicados por este repositório

Dependências usadas

Lista de dependências 4 itens
  • flutter{"sdk":"flutter"}
  • intl>=0.17.0
  • flutter_testDesenvolvimento{"sdk":"flutter"}
  • flutter_lintsDesenvolvimentoany

README original

Texto original em inglês. Visite o GitHub para a versão atual.

Expandir / recolher 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