creta_counter 0.3.0
creta_counter: ^0.3.0 copied to clipboard
A beautiful, accessible, keyboard-friendly counter widget for Flutter.
Creta Counter #
Flutter counter widget package targeting pub.dev.
- Requirements: see
doc/requirements.md - Example app entry:
example/lib/main.dart
Usage #
import 'package:creta_counter/creta_counter.dart';
CretaCounter(
width: 260,
height: 80,
radius: 16,
elevation: 2,
showButtons: true,
initialCount: 0,
min: -5,
max: 5,
boundaryBehavior: CretaCounterBoundaryBehavior.clamp, // or wrap
foregroundColor: Colors.black,
backgroundColor: Colors.white,
// If provided, overrides internal font scaling
textStyle: TextStyle(fontSize: 28, fontWeight: FontWeight.w700),
onChanged: (value) {
// handle value
},
);
Parameters #
width,height: 가변 크기 지정. null이면 부모 제약에 따름radius: 둥근 모서리 픽셀showButtons: 좌/우 버튼 표시 여부initialCount: 초기 카운트 값(음수 허용)min,max: 최소/최대값(옵션)boundaryBehavior:clamp(경계 고정) 또는wrap(순환)foregroundColor,backgroundColor: 전경/배경 색상elevation: 그림자 세기(머티리얼 elevation)- Press-and-hold: 길게 누르면 가속 증감 (기본 활성화)
Example #
실행:
flutter run -d chrome -t example/lib/main.dart
엔트리: example/lib/main.dart
Run on Windows #
cd example
flutter run -d windows
Run on Android #
cd example
flutter run -d android
Publishing #
- Update version in
pubspec.yaml(e.g., 0.1.0) - Ensure clean analysis and tests pass
- Dry run:
dart pub publish --dry-run
- Tag and push (example):
git tag v0.1.0
git push origin v0.1.0
- Publish:
dart pub publish
Status #
MVP complete. Tests and example included.