super_button_package
Composable SuperButton API with SuperButtonStyle (variant, size, shape, tone) and a stack of SuperButtonEffect hooks. Out of the box: theme resolution via SuperButtonColorResolver (per tone / variant / state), and built-in effects (scale, focus ring, ink tint, elevation, loading overlay). The repository includes a full example gallery (filterable matrix on Gallery, effects playground, combinations, basic accessibility).
Status — pre-1.0: the public API and visuals will evolve. Follow SemVer and the CHANGELOG; lock to a specific version in apps.
Pub.dev version: the published version is the
versionfield inpubspec.yamlat the release tag. Current line release: 0.2.1 (super_button_package: ^0.2.1).
Install
Add to your pubspec.yaml:
dependencies:
super_button_package: ^0.2.1
Run:
flutter pub get
Usage
import 'package:super_button_package/super_button_package.dart';
SuperButton(
onPressed: () {},
label: const Text('Continue'),
leading: const Icon(Icons.check),
style: const SuperButtonStyle(
variant: SuperButtonVariant.filled,
size: SuperButtonSize.md,
shape: SuperButtonShape.pill,
tone: SuperButtonTone.primary,
),
effects: const [SuperIdentityEffect()],
loading: false,
);
Example app (showcase)
From the package repository:
cd example
flutter run
# Web: flutter run -d chrome
Documentation
- API reference: pub.flutter-io.cn documentation tab (generated after publish).
- Design and release process: doc/PHASE_1_SETUP.md, doc/PHASE_2_PACKAGE_AND_EXAMPLES.md, doc/PHASE_3_PUBLISHING.md.