contextual_text 0.0.1 copy "contextual_text: ^0.0.1" to clipboard
contextual_text: ^0.0.1 copied to clipboard

Detect keywords or context

contextual_text #

A Flutter package that styles text based on specific keywords. Useful for apps that display dynamic or user-generated content with varying contexts.

Usage #

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: ContextualText(
            text: 'This is an urgent message with some positive vibes!',
            defaultStyle: TextStyle(color: Colors.black),
            keywordStyles: {
              'urgent': TextStyle(color: Colors.red, fontWeight: FontWeight.bold),
              'positive': TextStyle(color: Colors.green),
            },
          ),
        ),
      ),
    );
  }
}
2
likes
130
points
15
downloads

Publisher

unverified uploader

Weekly Downloads

Detect keywords or context

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on contextual_text