Buscar pacotes, repositórios e categorias de apps

Repositório GitHubcristianpaulo4/utils_rinch_text

utils_rinch_text

Este método retorna uma lista de TextSpan ideal para formatar texto longo. Esta implementação suporta as seguintes tags, veja o exemplo.

Capa do projeto utils_rinch_text
Estrelas
2
Forks
0
Último push (UTC)
4 de fev. de 2023
Status do projeto
Ativo

README original

Texto original em inglês. Visite o GitHub para a versão atual.

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,
         ),
       },
     ),
   ),
 ), 
Cristian Paulo  GitHub avatar
Autor no GitHub

Cristian Paulo ↗

Graduado em Análise e Desenvolvimento de Sistemas pelo Instituto Federal do Piaui Campus-Corrente, residente em Formosa do Rio Preto - BA

Formosa do Rio Preto - BASite oficial ↗
LinguagensC++CMakeDartHTMLCObjective-CJavaShellSwiftKotlin

Dependências usadas

Lista de dependências 4 itens

Como escolher um repositório para seu projeto?

Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.

  1. Busque por nome, autor ou descrição e filtre por tema.
  2. Compare estrelas, forks e envios recentes. Estrelas indicam interesse, mas não garantem qualidade.
  3. Confira o README, a licença e as issues no GitHub antes de usar o projeto.

Fontes e manutenção

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗