icon_to_text_extension_codespark 0.0.3
icon_to_text_extension_codespark: ^0.0.3 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.3 - 2025-06-01 #
Added #
- Support for
onTap
callback intoTextSpan
, enabling interactive text behavior. - Allows tapping on the combined icon+text span for actions like navigation, popups, etc.
- Internally wraps the span with a
TapGestureRecognizer
whenonTap
is provided. - Added IconTextLabel widget for a declarative and convenient way to render icons as styled text with prefix, postfix, and full layout/accessibility control
0.0.2 - 2025-06-01 #
Added #
- Support for overriding
iconColor
specifically for the icon character in bothtoText
andtoTextSpan
. - Support for setting a
semanticsLabel
for screen readers viaiconSemanticsLabel
intoTextSpan
andsemanticsLabel
intoText
. - Support for
textAlign
,textDirection
,maxLines
, andtextOverflow
intoText
. - 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
toText
/TextSpan
extension methods. - Support for both Material and Cupertino icons.
- Preserves original icon
fontFamily
andfontPackage
. iconToString()
extension method to convertIconData
to a raw string character.toTextSpan(...)
method with:- Optional
TextStyle
for base styling. - Optional
prefix
andpostfix
support.
- Optional
toText(...)
method that wrapstoTextSpan
into aText.rich(...)
widget.- Example app showcasing usage of
toText
,toTextSpan
, andiconToString()
method. - README file with:
- Package banner.
- Pub.dev and GitHub badges.
- Full usage instructions.
- API documentation.
- Screenshot preview of example app.