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

A Flutter package that provides a widget for displaying text with highlighted search terms, enabling easy customization and highlighting within the text.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:searchable_text/text.dart';

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

  @override
  Widget build(BuildContext context) {

    var searchQuery = "";
    List<Models> results = [];

    return Scaffold(
      appBar: AppBar(title: const Text('Searchable Text Example')),
      body: ListView.builder(
        itemBuilder: (BuildContext context, int index) {
          var item = results[index];
          return ListTile(
            title: SearchableText(
              item.name,
              style: TextStyle(
                color: Themes.textColor,
                fontSize: 11.sp,
                fontFamily: 'nexaRegular',
              ),
              searchTerm: searchQuery.value,
            ),
          );
        },
        itemCount: results.length,
      ),
    );
  }
}
3
likes
0
pub points
49%
popularity

Publisher

verified publishermicroprogramers.org

A Flutter package that provides a widget for displaying text with highlighted search terms, enabling easy customization and highlighting within the text.

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on searchable_text