flexible_text 1.1.0+3 flexible_text: ^1.1.0+3 copied to clipboard
Powerful and flexible solution to create dynamic, interactive and customizable text with widgets, allows to write a single text block to show anything you want.
import 'package:flexible_text/flexible_text.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
void main() {
FlexibleText text = FlexibleText(
text: 'Hello :World:~1~',
style: const TextStyle(color: Colors.black),
richStyles: const [TextStyle(color: Colors.red)],
textRecognizers: [
TapGestureRecognizer()
..onTap = () {
debugPrint('World tapped');
}
],
widgets: const [
Icon(Icons.star),
],
);
runApp(text);
// Will Show Hello World ⭐️
}