icon_to_text_extension_codespark 0.0.2 copy "icon_to_text_extension_codespark: ^0.0.2" to clipboard
icon_to_text_extension_codespark: ^0.0.2 copied to clipboard

Flutter extension to render any IconData (Material or Cupertino) as Text or TextSpan for inline icons in rich text and custom layouts.

Changelog #

All notable changes to this project will be documented in this file.

0.0.2 - 2025-06-01 #

Added #

  • Support for overriding iconColor specifically for the icon character in both toText and toTextSpan.
  • Support for setting a semanticsLabel for screen readers via iconSemanticsLabel in toTextSpan and semanticsLabel in toText.
  • Support for textAlign, textDirection, maxLines, and textOverflow in toText.
  • Full parameter forwarding to improve flexibility and integration into different layouts and accessibility contexts.

0.0.1 - 2025-05-30 #

Added #

  • Initial release with IconData to Text / TextSpan extension methods.
  • Support for both Material and Cupertino icons.
  • Preserves original icon fontFamily and fontPackage.
  • iconToString() extension method to convert IconData to a raw string character.
  • toTextSpan(...) method with:
    • Optional TextStyle for base styling.
    • Optional prefix and postfix support.
  • toText(...) method that wraps toTextSpan into a Text.rich(...) widget.
  • Example app showcasing usage of toText, toTextSpan, and iconToString() method.
  • README file with:
    • Package banner.
    • Pub.dev and GitHub badges.
    • Full usage instructions.
    • API documentation.
    • Screenshot preview of example app.
3
likes
160
points
50
downloads
screenshot

Publisher

verified publisherksaikiran.tech

Weekly Downloads

Flutter extension to render any IconData (Material or Cupertino) as Text or TextSpan for inline icons in rich text and custom layouts.

Repository (GitHub)
View/report issues

Topics

#icondata #icons-to-text #material-icons #inline-icons #flutter-extensions

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on icon_to_text_extension_codespark