icon_to_text_extension_codespark 1.0.0
icon_to_text_extension_codespark: ^1.0.0 copied to clipboard
Flutter extension to convert any IconData to inline Text or TextSpan. Material, Cupertino, and custom icon font support with rich text builder and full accessibility.
Changelog #
All notable changes to this project will be documented in this file.
1.0.0 - 2026-06-10 #
Added #
IconRichTextBuilderutility class withbuildSpan()andbuildRichText()static methods for composing inline rich text from a flat list ofString,IconData, andInlineSpanparts.CustomCodePointExtensiononint— addstoCustomTextSpan()andtoCustomText()for rendering any Unicode code point using a custom icon font family (e.g. FontAwesome, Ionicons, Remix Icons). The font must be registered in the host app's pubspec.yaml.toWidgetSpan()onIconData— embeds the icon as aWidgetSpanwithin an inline widget tree. AcceptsiconSize,iconColor,iconStyle,alignment, andsemanticsLabel.- Interactive tabbed playground in the
example/app covering all features: basic icon text, rich text builder, custom font icons, andIconTextLabel. - Detailed
///documentation comments on all public APIs for IDE hover support in VS Code, Android Studio, and other Dart-aware editors.
Changed #
- Bumped to stable
1.0.0. - Updated
READMEwith full API documentation, inline rich content examples, custom font icon examples, attribution, badges, and a clean roadmap. - Updated
pubspec.yamldescription for better pub.dev SEO; replacedinline-iconstopic withcustom-fonts.
0.0.3 - 2025-06-01 #
Added #
- Support for
onTapcallback 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
TapGestureRecognizerwhenonTapis provided. - Added
IconTextLabelwidget 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
iconColorspecifically for the icon character in bothtoTextandtoTextSpan. - Support for setting a
semanticsLabelfor screen readers viaiconSemanticsLabelintoTextSpanandsemanticsLabelintoText. - Support for
textAlign,textDirection,maxLines, andtextOverflowintoText. - Full parameter forwarding to improve flexibility and integration into different layouts and accessibility contexts.
0.0.1 - 2025-05-30 #
Added #
- Initial release with
IconDatatoText/TextSpanextension methods. - Support for both Material and Cupertino icons.
- Preserves original icon
fontFamilyandfontPackage. iconToString()extension method to convertIconDatato a raw string character.toTextSpan(...)method with optionalTextStyle, prefix, and postfix support.toText(...)method that wrapstoTextSpaninto aText.rich(...)widget.- Example app showcasing usage of
toText,toTextSpan, andiconToString(). - README with package banner, badges, usage instructions, and screenshot preview.