drop_down_search_field 1.1.0 copy "drop_down_search_field: ^1.1.0" to clipboard
drop_down_search_field: ^1.1.0 copied to clipboard

Customizable DropdownSearchField extending features DropdownButton, TextFormField and Autocomplete.

example/lib/main.dart

import 'dart:ui';
import 'package:example/example_widgets/multi_select_example.dart';
import 'package:example/example_widgets/paginated_suggestion_example.dart';
import 'package:example/example_widgets/form_field_example.dart';
import 'package:flutter/material.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(
      title: 'Drop down Search Field demo',
      scrollBehavior: const MaterialScrollBehavior().copyWith(
          dragDevices: {PointerDeviceKind.mouse, PointerDeviceKind.touch}),
      home: DefaultTabController(
        length: 1,
        child: Scaffold(
          appBar: AppBar(
            title: const Text('Dropdown Search Field Demo'),
          ),
          body: GestureDetector(
            onTap: () => FocusScope.of(context).unfocus(),
            child: Center(
              child: Builder(
                builder: (context) => Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    ElevatedButton(
                      onPressed: () {
                        Navigator.push(
                          context,
                          MaterialPageRoute(
                              builder: (context) => const FormFieldExample()),
                        );
                      },
                      child: const Text('Form Field Example'),
                    ),
                    const SizedBox(height: 20),
                    ElevatedButton(
                      onPressed: () {
                        Navigator.push(
                          context,
                          MaterialPageRoute(
                              builder: (context) =>
                                  const MultiSelectDropdown()),
                        );
                      },
                      child: const Text('Multi Select Example'),
                    ),
                    const SizedBox(height: 20),
                    ElevatedButton(
                      onPressed: () {
                        Navigator.push(
                          context,
                          MaterialPageRoute(
                              builder: (context) =>
                                  const PaginatedSuggestionExample()),
                        );
                      },
                      child: const Text('Paginated Suggestion Example'),
                    ),
                  ],
                ),
              ),
            ),
          ),
        ),
      ),
    );
  }
}
47
likes
150
points
6.49k
downloads

Publisher

unverified uploader

Weekly Downloads

Customizable DropdownSearchField extending features DropdownButton, TextFormField and Autocomplete.

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MIT (license)

Dependencies

flutter, pointer_interceptor

More

Packages that depend on drop_down_search_field