search_select 1.0.11 copy "search_select: ^1.0.11" to clipboard
search_select: ^1.0.11 copied to clipboard

A Flutter dropdown for search select and multi-select functionality widget.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: Scaffold(
        appBar: AppBar(title: const Text('Search Select Example')),
        body: Padding(
          padding: const EdgeInsets.all(8.0),
          child: SingleChildScrollView(
            child: Column(
              children: [
                SearchSelect<String>(
                  itemsStyleType: ItemsStyleType.chip,
                  items: [
                    "item 01",
                    "item 02",
                    "item 03",
                    "item 04",
                    "item 05",
                    "item 06",
                    "item 07",
                    "item 08",
                  ],
                  label: 'Multiple selection',
                  allowMultiple: false,
                  selectedItems: [],
                  selectedItem: "item 08",
                  validator: (v) {
                    if (v.isEmpty) return 'Please select at least one item';
                    return null;
                  },
                  onChange: (values) {
                    // change your variable list here
                  },
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
4
likes
150
points
47
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter dropdown for search select and multi-select functionality widget.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on search_select