flutter_quad_annotator 0.1.0
flutter_quad_annotator: ^0.1.0 copied to clipboard
A Flutter package for quadrilateral annotation with draggable vertices and edges, featuring magnifier, grid assistance, and highly customizable styling options.
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.1.0 - 2024-12-19 #
๐ Major Refactoring #
- BREAKING CHANGE: Refactored breathing animation and magnifier parameters into dedicated configuration objects
- Replaced scattered parameters with
BreathingAnimationandMagnifierConfigurationclasses - Improved code organization and maintainability
โจ New Features #
-
BreathingAnimation Configuration:
- Added
BreathingAnimationclass for centralized breathing effect configuration - Configurable breathing color, duration, opacity range, spacing, and stroke width
- Enhanced visual feedback with customizable breathing light effects
- Added
-
MagnifierConfiguration Enhancement:
- Added
MagnifierConfigurationclass for comprehensive magnifier settings - Support for multiple magnifier shapes (circle, square)
- Configurable position modes (edge, corner, follow)
- Customizable crosshair appearance and border styling
- Enhanced magnifier positioning with corner and edge offset options
- Added
๐ ๏ธ API Improvements #
- Simplified API with grouped configuration parameters
- Better type safety with dedicated configuration classes
- Improved extensibility for future feature additions
- Enhanced code reusability across different use cases
- Dynamic Size Detection: Width and height parameters are now optional, supporting automatic size detection
- Enhanced Magnifier Positioning:
edgeOffsetparameter type changed fromdoubletoOffsetfor 2D positioning (edgeOffsetๅๆฐ็ฑปๅไปdoubleๅไธบOffsetไปฅๆฏๆไบ็ปดๅฎไฝ)
๐ Documentation #
- Updated README.md with new API structure
- Added comprehensive configuration examples
- Removed outdated grid assistance feature documentation
- Enhanced API documentation with parameter tables
๐ง Developer Experience #
- Better IntelliSense support with structured configuration objects
- Cleaner code organization in example applications
- Improved maintainability with logical parameter grouping
โ ๏ธ Migration Guide #
To migrate from 0.0.1 to 0.1.0:
// Old API (0.0.1)
QuadAnnotatorBox(
enableBreathing: true,
breathingColor: Colors.white,
enableMagnifier: true,
magnifierRadius: 60.0,
)
// New API (0.1.0)
QuadAnnotatorBox(
breathing: const BreathingAnimation(
enabled: true,
color: Colors.white,
),
magnifier: const MagnifierConfiguration(
enabled: true,
radius: 60.0,
),
)
0.0.1 - 2024-12-19 #
Added #
-
๐ Initial release of Flutter Quad Annotator package
-
โจ Core Features:
- Draggable quadrilateral vertices for precise shape adjustment
- Draggable edges for moving entire quadrilateral
- Interactive magnifier with customizable size and scale
- Optional grid overlay for alignment assistance
- Single-touch gesture recognition to avoid multi-touch interference
-
๐จ Customization Options:
- Configurable vertex colors, sizes, and styles
- Customizable edge colors and widths
- Adjustable background colors
- Grid spacing and appearance settings
- Magnifier positioning and behavior options
-
๐ฑ Event System:
onVerticesChanged- Triggered when quadrilateral shape changesonVertexDragStart/onVertexDragEnd- Vertex drag lifecycle eventsonEdgeDragStart/onEdgeDragEnd- Edge drag lifecycle events
-
๐ง Developer Experience:
- Comprehensive example application
- Interactive control panel for testing all features
- Real-time coordinate display
- Well-documented API with inline comments
-
๐๏ธ Architecture:
QuadAnnotatorBox- Main annotation widgetQuadAnnotatorController- State managementRectangleFeature- Quadrilateral data modelQuadrilateralPainter- Custom rendering engineSingleTouchPanGestureRecognizer- Gesture handling
-
๐ฏ Additional Features:
- Auto-detection support with
rectangle_detectorintegration - Preview mode for read-only display
- Flexible initialization with custom or auto-detected rectangles
- Optimized performance with efficient rendering
- Auto-detection support with
Technical Details #
- Flutter SDK: >=1.17.0
- Dart SDK: ^3.8.1
- Dependencies: rectangle_detector ^1.0.0
- Platform Support: iOS, Android, Web, Desktop
Documentation #
- Comprehensive README with usage examples
- API documentation with parameter descriptions
- Example application demonstrating all features
- MIT License for open-source usage
[Unreleased] #
Planned Features #
- โ Undo/Redo functionality
- โ Keyboard shortcuts support
- โ Export/Import quadrilateral data
- โ Multiple quadrilateral support
- โ Animation transitions
- โ Accessibility improvements
- โ Performance optimizations
- โ Additional gesture recognizers
Note: This changelog follows the Keep a Changelog format. For migration guides and breaking changes, please refer to the documentation.