select_multi_dropdown 0.0.2 copy "select_multi_dropdown: ^0.0.2" to clipboard
select_multi_dropdown: ^0.0.2 copied to clipboard

A customizable multi-select dropdown widget for Flutter. This package allows users to select multiple items from a dropdown list with ease. It supports dynamic item lists, initial selection, and provi [...]

select_multi_dropdown #

Multi-Select Dropdown package lets you add a customizable multi-select dropdown widget to your Flutter app.

Installation #

  1. Add the latest version of the package to your pubspec.yaml (and run dart pub get):
dependencies:
  select_multi_dropdown: ^0.0.2
  1. Import the package and use it in your Flutter App.
import 'package:select_multiple_dropdown/select_multi_dropdown.dart';

Example #

There are a number of properties that you can modify:

  • items (List of items to select from)
  • initialSelectedItems (List of initially selected items)
  • onSelectionChanged (Callback when selection changes)
  • hintText (Hint text for the dropdown)

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

class MultiSelectExample extends StatefulWidget {
  @override
  _MultiSelectExampleState createState() => _MultiSelectExampleState();
}

class _MultiSelectExampleState extends State<MultiSelectExample> {
  final List<String> _items = ['Apple', 'Banana', 'Cherry', 'Date', 'Fig'];
  List<String> _selectedItems = [];

  void _onSelectionChanged(List<String> selectedItems) {
    setState(() {
      _selectedItems = selectedItems;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('Multi Select Dropdown Example')),
      body: Center(
        child: MultiSelectDropdown<String>(
          items: _items,
          initialSelectedItems: _selectedItems,
          onSelectionChanged: _onSelectionChanged,
          hintText: 'Select Fruits',
        ),
      ),
    );
  }
}

Next Goals #

  • Add customization for dropdown styling. Now, you can specify the styling properties for the dropdown.

  • Add support for different item types. The dropdown supports various data types like strings, numbers, etc.

  • Add more features and customization options.

This template provides a clear and concise README.md that explains the installation, usage, and features of your select_multi_dropdown package. It also includes an example with code and an image placeholder to illustrate the widget's usage in a Flutter app.

2
likes
120
points
31
downloads

Publisher

unverified uploader

Weekly Downloads

A customizable multi-select dropdown widget for Flutter. This package allows users to select multiple items from a dropdown list with ease. It supports dynamic item lists, initial selection, and provides callbacks for selection changes. Ideal for use in forms and data input scenarios where multiple choices are required.

Homepage

Documentation

API reference

License

unknown (license)

Dependencies

flutter

More

Packages that depend on select_multi_dropdown