tappable 0.2.0
tappable: ^0.2.0 copied to clipboard
Core tappable widgets for Flutter. Provides Tappable and TappableContainer with Material Design integration. UI elements have moved to tappable_elements package.
📋 Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.2.0 - 2025-11-12 #
🗑️ Deprecated #
- TButton: Moved to
tappable_elementspackage asTeButton- Use
package:tappable_elementsfor button components - Will be removed in version 1.0.0
- Use
- TCheckbox: Moved to
tappable_elementspackage asTeCheckbox- Use
package:tappable_elementsfor checkbox components - Will be removed in version 1.0.0
- Use
- TSwitch: Moved to
tappable_elementspackage asTeSwitch- Use
package:tappable_elementsfor switch components - Will be removed in version 1.0.0
- Use
📦 Package Restructuring #
- Core widgets remain:
TappableandTappableContainerare still part of this package - UI elements extracted: Button, Checkbox, and Switch widgets moved to dedicated
tappable_elementspackage - Better separation: Core touch/tap functionality separated from UI components
📝 Migration Guide #
// Before (tappable 0.0.1)
import 'package:tappable/tappable.dart';
TButton(onPressed: () {}, child: Text('Click me'))
// After (tappable 0.2.0)
import 'package:tappable/tappable.dart'; // For Tappable and TappableContainer
import 'package:tappable_elements/tappable_elements.dart'; // For UI elements
TeButton(onPressed: () {}, child: Text('Click me'))
🎯 Rationale #
- Improves package modularity and maintainability
- Allows independent versioning of UI components
- Reduces dependencies for apps only needing core tap functionality
- Prepares for future expansion of UI element library
0.0.1 - 2025-10-26 #
Added #
- Initial release of the tappable package
Tappablewidget with Material Design ink effects- Support for custom splash and highlight colors
- Configurable border radius for ink effects
- Optional padding and fill parent functionality
- Support for custom splash factories
TappableContainerwidget combining Tappable with Container- Automatic border radius extraction from BoxDecoration
- Full Container parameter support
- Seamless integration of tap effects with container styling
TCheckboxwidget with customizable appearance- Stack-based architecture with background and thumb layers
- Builder pattern support via
buildBackgroundandbuildThumb - Configurable size and border radius
- Default Material Design-like styling
TSwitchwidget with smooth animations- Animated thumb position and background color
- Customizable via builder pattern
- Configurable animation duration
- Default toggle switch appearance with shadow effects
TButtonwidget for highly customizable buttons- Built on TappableContainer foundation
- Support for disabled states with custom styling
- Configurable disabled opacity
- Full Container and Tappable parameter exposure
- Tree-shakable exports for optimal bundle size
- Main export file for all widgets
- Individual widget exports in
widgets/directory
- Comprehensive documentation in CLAUDE.md
- Complete API reference for all widgets
- Multiple examples from basic to advanced
- Design philosophy and best practices
- Advanced usage patterns
- MIT License
- README with package overview
Architecture Decisions #
- Chose Stack-based approach for checkbox and switch to maximize customization
- Separated tappable logic from container logic for better composition
- Used builder pattern for custom rendering to provide maximum flexibility
- Implemented tree-shakable exports to support minimal bundle sizes
[Unreleased] #
Planned #
- Haptic feedback support
- Accessibility improvements (focus, keyboard navigation, semantic labels)
- Additional widgets (TRadio, TSlider, TSegmentedControl)
- Theme support with InheritedWidget
- Example application
- Comprehensive test coverage