pretty_print 2.0.2 copy "pretty_print: ^2.0.2" to clipboard
pretty_print: ^2.0.2 copied to clipboard

A powerful Dart library for terminal text styling with ANSI escape codes. Features 75+ extension methods and logging utilities.

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.

2.0.2 - 2025-10-04 #

๐ŸŽจ IMPROVEMENTS #

  • Visual Layout: Updated README.md to display screenshots in a horizontal row layout
  • Better Presentation: Screenshots now appear side-by-side in a responsive table format
  • Enhanced UX: More compact and visually appealing documentation layout

2.0.1 - 2025-10-04 #

๐Ÿ”ง FIXES #

  • Package Description: Shortened description to meet pub.dev requirements (60-180 characters)
  • Screenshot Files: Renamed screenshot files to follow Dart naming conventions:
    • Screenshot from 2025-10-04 14-52-24.png โ†’ basic_styling.png
    • Screenshot from 2025-10-04 14-52-34.png โ†’ advanced_formatting.png
    • Screenshot from 2025-10-04 14-52-48.png โ†’ professional_output.png
  • File Conventions: Updated all file references to use proper naming without spaces
  • Pub.dev Validation: Fixed all pub.dev validation issues for successful publishing

2.0.0 - 2025-10-04 #

๐Ÿšจ BREAKING CHANGES #

  • Method Rename: PrettyPrint.pprint() โ†’ PrettyPrint.log()
  • Enum Rename: AlphaAndAnim โ†’ TextBlink
  • Enum Rename: TextDone โ†’ TextThroughLine
  • Parameter Rename: textAlphaAnim โ†’ textBlink
  • Parameter Rename: textDone โ†’ textThroughLine
  • Removed Static Methods: PrettyPrint.success(), info(), warning(), error() (replaced with string extensions)

โœจ NEW FEATURES #

  • ๐ŸŽฏ 75+ String Extension Methods: Comprehensive fluent API for terminal styling
  • ๐Ÿ“‹ Logging Extensions: .successLog(), .infoLog(), .warningLog(), .errorLog(), .debugLog(), .criticalLog(), .traceLog(), .performanceLog()
  • ๐ŸŽจ Styling Extensions: .bold(), .italic(), .underline(), .lineThrough(), .blink(), .fastBlink(), .dim(), .hide(), .boldUnderline(), .italicUnderline(), .allEffects()
  • ๐ŸŒˆ Color Extensions: .red(), .green(), .blue(), .onRed(), .onGreen(), .boldRed(), .boldGreen(), .rainbow(), and 25+ more
  • ๐Ÿ“ Formatting Extensions: .header(), .box(), .doubleBox(), .separator(), .leftAlign(), .center(), .bullet(), .numbered(), .indent(), .quote(), .code(), and more
  • ๐Ÿ› Debug Extensions: .todo(), .fixme(), .note(), .debugPrint(), .inspect(), .variable(), .benchmark(), .memory(), .network(), .security(), and more

๐Ÿ—๏ธ ARCHITECTURE IMPROVEMENTS #

  • Modular Extensions: Split string extensions into categorized files:
    • string_logging_ext.dart - Logging methods (8 methods)
    • string_styling_ext.dart - Text styling (12 methods)
    • string_colors_ext.dart - Color applications (25+ methods)
    • string_formatting_ext.dart - Layout and formatting (16 methods)
    • string_debug_ext.dart - Development and debugging (16 methods)

๐Ÿ“š DOCUMENTATION & EXAMPLES #

  • Visual Showcase: Added screenshots in README.md
  • Consolidated Examples: Single comprehensive example/example.dart file
  • Enhanced API Reference: Complete documentation of all 75+ methods
  • Professional Usage Examples: Real-world CLI application patterns

๐Ÿ”ง TECHNICAL IMPROVEMENTS #

  • Better Enum Naming: More intuitive and consistent enum names
  • Improved Parameter Names: Clearer parameter naming conventions
  • Enhanced Type Safety: Better type definitions and documentation
  • Performance Optimizations: More efficient string processing

๐Ÿ“ฆ MIGRATION GUIDE #

Method Renaming

// Old (v1.x)
PrettyPrint.pprint("Hello", textColor: PrintColor.red);

// New (v2.x)
PrettyPrint.log("Hello", textColor: PrintColor.red);

Enum Renaming

// Old (v1.x)
PrettyPrint.pprint("Text", textAlphaAnim: AlphaAndAnim.slowAnim, textDone: TextDone.done);

// New (v2.x)
PrettyPrint.log("Text", textBlink: TextBlink.slowBlink, textThroughLine: TextThroughLine.lineThrough);

Status Messages

// Old (v1.x)
PrettyPrint.success("Operation completed");
PrettyPrint.error("Something went wrong");

// New (v2.x) - Use string extensions
"Operation completed".successLog();
"Something went wrong".errorLog();

Extension Methods (New in v2.x)

// Beautiful fluent API
"Important text".bold().red();
"Debug info".todo();
"Server status".header();
"List item".bullet();
"Code example".code();

1.0.0 - 2025-09-27 #

Added #

  • ๐ŸŽจ Complete color support: 8 beautiful colors for text and background (black, red, green, yellow, blue, magenta, cyan, white)
  • ๐ŸŽญ Rich text styling: Bold, italic, underline, and strikethrough text formatting
  • โœจ Special effects: Blinking animations (slow/fast), semi-transparency, and hidden text
  • ๐Ÿš€ Easy-to-use API: Simple PrettyPrint.pprint() method with intuitive parameters
  • ๐Ÿ“ฆ Zero dependencies: Lightweight package with no external dependencies
  • ๐ŸŽฏ Type safety: Full Dart type safety with comprehensive enums
  • ๐ŸŒ Cross-platform: Works on Windows, macOS, and Linux terminals
  • ๐Ÿ“š Comprehensive documentation: Detailed API documentation with examples
  • ๐ŸŽจ Beautiful examples: Complete example file showcasing all features
  • ๐Ÿงช Production ready: Thoroughly tested and documented

Features #

  • PrettyPrint class: Main class for printing styled text
  • PrintColor enum: 8 colors plus none option for text and background colors
  • TextWeight enum: Normal and bold text weight options
  • TextItalic enum: Italic text styling
  • TextUnderLine enum: Underline text decoration
  • TextDone enum: Strikethrough text decoration
  • AlphaAndAnim enum: Opacity and animation effects (semi-opacity, hide, slow/fast blinking)
  • ANSI escape codes: Full ANSI terminal formatting support
  • Customizable styling: Mix and match any combination of colors and styles

Documentation #

  • Complete README with usage examples and terminal compatibility information
  • Comprehensive API documentation for all classes and methods
  • Real-world use case examples (status messages, progress indicators, debug info)
  • Getting started guide and installation instructions

Examples #

  • Basic color and styling examples
  • Advanced multi-style combinations
  • Status message templates (success, warning, error, info)
  • Progress indicator patterns
  • Debug and logging use cases
  • CLI interface element styling

This initial release provides a complete, production-ready solution for terminal text formatting in Dart applications.

2
likes
160
points
14
downloads
screenshot

Publisher

verified publishermomaher.dev

Weekly Downloads

A powerful Dart library for terminal text styling with ANSI escape codes. Features 75+ extension methods and logging utilities.

Repository (GitHub)
View/report issues

Topics

#terminal #console #logging #ansi #print

Documentation

API reference

License

MIT (license)

More

Packages that depend on pretty_print