riching_text 0.1.1 copy "riching_text: ^0.1.1" to clipboard
riching_text: ^0.1.1 copied to clipboard

Build a rich text by providing a text and the words/phrases you want to highlight within.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:riching_text/riching_text.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(),
      home: Scaffold(
        appBar: AppBar(title: const Text('RichingText')),
        body: RichingText(
          highlights: [
            const ActionableText(
              text: 'RichingText example',
              style: TextStyle(color: Colors.pink),
            ),
            ActionableText(
              text: 'here',
              style: const TextStyle(
                color: Colors.green,
                decoration: TextDecoration.lineThrough,
              ),
              action: () {
                // Execute action
              },
            ),
          ],
          text: 'RichingText example available here',
          style: const TextStyle(
            color: Colors.black,
            fontSize: 24,
            fontWeight: FontWeight.bold,
          ),
        ),
      ),
    );
  }
}
3
likes
150
points
7
downloads

Publisher

verified publishernetwriper.com

Weekly Downloads

Build a rich text by providing a text and the words/phrases you want to highlight within.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on riching_text