Pakete, Repositories und App-Kategorien suchen

Paketdetailsv2.0.0

extendable_dropdown

ExtendableDropdown ist ein vielseitiges Flutter-Paket für dynamische, anpassbare Dropdown-Menüs

AndroidiOSWebmacOSWindowsLinux
30-Tage-Downloads
35
Likes
2
Pub-Punkte
155

Paket installieren

flutter pub add extendable_dropdown

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

ExtendableDropdown ist ein flexibles Flutter-Paket, das die Erstellung dynamischer und anpassbarer Dropdown-Menüs auf mehreren Plattformen ermöglicht. Es unterstützt sowohl Einzel- als auch Mehrfachauswahl und ermöglicht Entwicklern die einfache Anpassung von Aussehen und Verhalten der Dropdowns. Das Paket integriert sich nahtlos in Flutter-Anwendungen und bietet flüssige Animationen sowie responsive Design. Mit Unterstützung für Android, iOS, Web, macOS, Windows und Linux sorgt es für konsistente Benutzererfahrungen über Geräte hinweg. Ideal für Formulare, Filter und Einstellungs-Oberflächen, verbessert es die Benutzerfreundlichkeit durch intuitive Interaktionsmuster.

Anwendungsfälle

  • Formularingaben
  • Daten filtern
  • Benutzereinstellungen
  • Einstellungsansichten
  • Dynamische Auswahllisten
  • Mehrfachauswahl-Auswahlfelder

Hauptmerkmale

  • Anpassbare Stilisierung
  • Mehrfachauswahlunterstützung
  • Glatte Animationen
  • Plattformübergreifende Kompatibilität
  • reaktives Design
  • Einfache Integration

Geeignet für

  • Entwickler, die Formulare erstellen
  • UI-Designer, die Flexibilität suchen
  • Apps, die dynamische Filterung erfordern
  • Plattformübergreifende Flutter-Projekte
  • Interaktive Benutzeroberflächen

Hinweise

  • Kann zusätzliche Stilisierung für komplexe Layouts erfordern
  • Leistungseinfluss bei großen Datensätzen
  • Eingeschränkte integrierte Überprüfung
  • Nicht für extrem lange Listen optimiert
  • Erfordert sorgfältige Zustandsverwaltung
  • Abhängig von externen Abhängigkeiten für erweiterte Funktionen

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

ExtendableDropdown

A Versatile Flutter Package for Dynamic, Generic Dropdown Menus (v1.0.4)

Introducing ExtendableDropdown, a production-ready Flutter package that empowers you to create dynamic and expandable multiple dropdown menus with full support for generic data types.

🚀 Key Features

  • Generic Type Support: Handle any data type (T) with full type safety. No longer restricted to strings!
  • Dynamic Slot Management: Add or remove dropdown slots on the fly with a simple, intuitive UI.
  • Dismissible Interaction: Swipe-to-dismiss functionality for removing selections with item return logic.
  • labelBuilder API: Complete control over how your custom objects are rendered as text in the dropdown.
  • Configurable UI Fragments: Pass your own Widgets for the Add Button and custom callbacks for message handling.
  • Fully Mutable-Safe: Built with immutability in mind, following Flutter's best practices for widget design.

📦 Installation

Add extendable_dropdown as a dependency in your pubspec.yaml file:

dependencies:
  extendable_dropdown: ^1.0.4

Import the package in your Flutter code:

import 'package:extendable_dropdown/extendable_dropdown.dart';

🛠 Usage

Simple Usage (Strings)
List<String> cities = ['Colombo', 'Kandy', 'Galle', 'Jaffna'];

ExtendableDropdown<String>(
  list: cities,
  onSendListChanged: (selectedItems) {
    print('Selected cities: $selectedItems');
  },
)
Advanced Usage (Custom Objects & UI)

You can use any custom model and fully override the UI.

ExtendableDropdown<Location>(
  list: myLocationList,
  onSendListChanged: (selected) => print(selected),
  labelBuilder: (location) => location.name,
  // Completely custom add button
  addButton: ElevatedButton.icon(
    onPressed: null, // Logic is handled internally
    icon: Icon(Icons.add),
    label: Text("Add Location"),
  ),
  // Custom notification logic
  onMessage: (context, message) {
    MyCustomToast.show(message);
  },
)

🎨 Professional Customization

ExtendableDropdown comes with a wide range of styling options:

Property Description Default
list The initial list of items to choose from. Required
onSendListChanged Callback triggered when the selection changes. Required
labelBuilder Function to map generic items to strings. item.toString()
addButton Widget: Custom widget for the add button. Styled default button
onMessage Callback: Handle custom alerts/notifications. Default SnackBar
dismissibleBackgroundColor Color shown when swiping to delete. Colors.red
selectedIcon Icon shown for a selected slot. Icons.radio_button_checked
nonSelectedIcon Icon shown for an empty slot. Icons.location_on_outlined
dropdownBorderRadius Border radius of the dropdown container. 10.0
Check out the [example](file:///Users/mymac/Documents/MyProjects/extendable_dropdown/example/lib/main.dart) folder for a full implementation!

🚧 Roadmap

  • [x] Generic data type support (Completed)
  • [x] Improved state management and immutability (Completed)
  • [ ] Searchable dropdown options
  • [ ] Multi-select within a single dropdown slot
  • [ ] Custom animation support for slot addition

🤝 Contributing

We welcome your feedback and contributions! Please feel free to open issues or submit pull requests.

📄 License

This project is licensed under the MIT License - see the [LICENSE](file:///Users/mymac/Documents/MyProjects/extendable_dropdown/LICENSE) file for details.


Made with ❤️ by Chanuka Ranathunga

Kategorien

Quell-Repository

Projekte, die dieses Paket verwenden

Noch keine Daten verfügbar.