Search packages, repositories and app categories

utils_rinch_text cover
Package detailsv1.0.3

utils_rinch_text

This method returns a list of TextSpan ideal for formatting long text this implementation supports the following tags, see example.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
19
Likes
9
Pub points
160

Install package

flutter pub add utils_rinch_text

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The utils_rinch_text package provides a utility method to format long text using TextSpan, supporting custom tags for rich text rendering. It enables structured text display with embedded formatting, ideal for dynamic content like chat messages or formatted descriptions. The package is compatible across all major platforms and simplifies the creation of complex text layouts without manual Span management. It leverages a clean API to parse and render tagged text efficiently.

Use cases

  • Chat message formatting
  • Dynamic content rendering
  • Rich text in UI components
  • Formatted descriptions
  • User-generated text processing

Key features

  • Supports custom text tags
  • Generates TextSpan lists
  • Cross-platform compatibility
  • Simple API integration
  • Efficient text parsing

Suitable for

  • Apps with rich text needs
  • Chat or messaging interfaces
  • Content-heavy UIs
  • Text formatting utilities
  • Flutter developers seeking simplicity

Considerations

  • Requires proper tag syntax
  • Limited to text formatting only
  • No built-in styling options
  • Depends on correct input structure
  • Not suitable for complex layouts

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

This method returns a list of TextSpan ideal for formatting long text this implementation supports the following tags, see example.

<a>Link web<a>
<p> add paragraph

Captura de tela 2023-02-03 195339

Add custom tags

Text de example:

 String textExample = """
  <i>Flutter<i> is an open source mobile app development framework <l>created by Google.<l> 
  It enables the creation of native apps for <i>iOS and Android<i> with a single Dart code base. 
  With its flexible and performant architecture, <o>Flutter has become one of the most 
  popular options for building mobile apps.<o> In addition, it offers a wide range of widgets 
  and animated visual effects that help you create attractive and intuitive applications. <p>
  For more information about Flutter, head over to the main 
  page at <a>https://flutter.dev/<a> and start <b>exploring the possibilities<b> 
  of this powerful app development tool.
  """;

Implementation

RichText(
   text: TextSpan(
     children: UtilsRinchText.generate(
       textExample,
       customTags: {
         "<i>": const TextStyle(
           fontWeight: FontWeight.bold,
           fontSize: 20,
         ),
         "<l>": const TextStyle(
           fontSize: 20,
           color: Colors.red,
           fontWeight: FontWeight.bold,
         ),
         "<a>": const TextStyle(
           color: Colors.green,
           fontWeight: FontWeight.bold,
         ),
         "<o>": const TextStyle(
           fontWeight: FontWeight.bold,
           color: Colors.blue,
           fontSize: 20,
         ),
         "<b>": const TextStyle(
           fontWeight: FontWeight.bold,
           color: Colors.orange,
           fontSize: 20,
         ),
       },
     ),
   ),
 ), 

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.