v0.2.3flutter_richtext_composer
Um pacote Flutter para compor texto rico de forma amigável com i18n
7Curtidas 149Downloads em 30 dias150Pontos Pub
AndroidiOSWebmacOSWindowsLinux
Um pacote Flutter para composição de texto rico
Texto original em inglês. Visite o GitHub para a versão atual.
A Flutter package for composing RichText in a i18n friendly way.
Import the library with
import 'package:flutter_richtext_composer/flutter_richtext_composer.dart';
Then you can start composing RichText like this:
RichTextComposer(
'Hi {name}, I am {my_name}! {icon}',
style: TextStyle(fontSize: 30),
placeholders: {
'name': TextSpan(
text: 'Son',
style: TextStyle(fontWeight: FontWeight.bold),
),
'my_name': TextSpan(
text: 'Dad',
style: TextStyle(
color: Colors.red,
decoration: TextDecoration.underline,
),
),
'icon': WidgetSpan(
child: GestureDetector(
child: Icon(Icons.person),
onTap: () {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text('Icon has been clicked'),
));
},
),
),
},
),
To escape the placeholder, prefix with \, e.g \{placeholder}:
RichTextComposer(
'Hi \\{dad}, I am {batman}!',
style: TextStyle(fontSize: 25),
placeholders: {
'batman': TextSpan(
text: 'Batman',
style: TextStyle(
color: Colors.red,
decoration: TextDecoration.underline,
),
),
},
),
Lista de dependências 2 itens
{"sdk":"flutter"}{"sdk":"flutter"}Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗