searchopts 0.0.3 copy "searchopts: ^0.0.3" to clipboard
searchopts: ^0.0.3 copied to clipboard

Widget that allow to fuzzy search/filter through options and select focusing on desktop shortcuts behavior.

example/lib/main.dart

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

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

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData.light(useMaterial3: true),
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: SearchOptions(
          onSelected: (v) => print(v),
          options: Option.fromString(["opt1", "opt2", "opt3"]),
          renderOption: (context, item, config) {
            final theme = Theme.of(context);
            return ListTile(
              title: Text(item),
              tileColor: config.isHighlighted
                  ? Color.alphaBlend(theme.hoverColor, theme.colorScheme.background)
                  : theme.colorScheme.background,
            );
          },
        ),
      ),
    );
  }
}
0
likes
155
points
13
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Widget that allow to fuzzy search/filter through options and select focusing on desktop shortcuts behavior.

Repository (GitHub)
View/report issues

License

Unlicense (license)

Dependencies

flutter, fuzzy_string, plugin_platform_interface

More

Packages that depend on searchopts