code_formatter_package 1.0.0 copy "code_formatter_package: ^1.0.0" to clipboard
code_formatter_package: ^1.0.0 copied to clipboard

A Flutter package for formatting and splitting Dart code into widgets.

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.

1.0.0 - 2025-01-26 #

Added #

  • FormatterResult class: Methods now return a FormatterResult object with detailed success/failure information
  • FormatterConfig class: Flexible configuration options for customizing the formatting behavior
  • ExtractedWidget class: Detailed information about each extracted widget
  • CodeFormatterException: Custom exception class with error types
  • CodeFormatterErrorType enum: Specific error types for better error handling
  • State class bundling: Automatically bundles State classes with their StatefulWidget
  • Import extraction: Preserves and includes original imports in generated files
  • Smart file naming: Uses widget class names converted to snake_case for file names
  • Preview feature: previewWidgets() method to preview extraction without saving
  • Async support: formatFileAsync() for non-blocking file operations
  • Callback support: onComplete callback in initializeFormatter()
  • Overwrite control: Option to skip existing files with overwriteExisting config
  • Header comments: Optional header comments in generated files
  • Comprehensive documentation: Full API documentation with examples

Changed #

  • API redesign: Methods now return FormatterResult instead of void
  • Configuration: Replaced individual parameters with FormatterConfig class
  • Error handling: Proper error types instead of print statements
  • File naming: Default to widget class name instead of widget_1.dart

Deprecated #

  • formatCodeLegacy() - Use formatCode() with FormatterConfig instead
  • formatFileLegacy() - Use formatFile() with FormatterConfig instead

0.0.7 - 2024-12-15 #

Fixed #

  • Minor bug fixes and stability improvements

0.0.6 - 2024-12-10 #

Added #

  • Automatic code formatting functionality
  • Custom widget naming support
  • Example file demonstrating package usage

Changed #

  • Improved file output handling with organized structure
  • Updated Flutter version compatibility (>=3.0.0)
  • Updated Dart SDK version (>=3.4.4 <4.0.0)

Fixed #

  • Resolved issues with relative paths for Dart files
  • Stability improvements for large file formatting

0.0.5 - 2024-12-01 #

Added #

  • Initial implementation of widget extraction using Dart analyzer
  • Support for StatelessWidget and StatefulWidget extraction
  • Custom output directory configuration
  • Basic error handling

0.0.1 - 2024-11-15 #

Added #

  • Initial release
  • Basic code formatting functionality
2
likes
150
points
134
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for formatting and splitting Dart code into widgets.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

analyzer, flutter, path

More

Packages that depend on code_formatter_package