Der Nachfolger von smart_select und chips_choice mit einer saubereren, flexibleren und komponierbaren API zum Erstellen von Inline- oder angeforderten Auswahlwidgets mit ein- oder mehrfacher Auswahl.
Aus öffentlichen Paketdaten erstellte Orientierung.
Choice ist ein modernes Flutter-Paket, das zur Erstellung flexibler, zusammensetzbarer Auswahl-Widgets mit Unterstützung für Einzel- und Mehrfachauswahl entwickelt wurde. Es ersetzt ältere Pakete wie smart_select und chips_choice und bietet eine saubere API für Inline- oder angeforderte Auswahlinterfaces. Ideal für Formulare, Filter und tagbasierte Eingaben, bietet es eine konsistente und anpassbare Erfahrung über Plattformen hinweg. Das Paket legt Wert auf Entwickler-Ergonomie und UI-Flexibilität, wodurch die Integration in vielfältige App-Designs einfach wird.
Anwendungsfälle
Formular-Eingaben mit auswählbaren Optionen
Filter-Schnittstellen
Dateneingabe basierend auf Tags
Dynamische Auswahllisten
Benutzerpräferenzauswahl
Mehrfachauswahl-Auswahlfelder
Hauptmerkmale
Saubere und intuitive API
Unterstützung für einzelne und mehrfache Auswahl
Flexible Inline- oder angeforderte Layouts
Hochgradig anpassbare Erscheinung
Plattformübergreifende Kompatibilität
Komponierbare Widget-Design
Geeignet für
Entwickler, die moderne Alternativen zu veralteten Auswahlpaketen suchen
Apps, die dynamische, wiederverwendbare Auswahlkomponenten erfordern
Projekte, die auf UI-Konsistenz und Wartbarkeit achten
Teams, die Entwicklererfahrung und Codeklarheit priorisieren
Anwendungen mit komplexen Filter- oder Tagging-Anforderungen
Hinweise
Kenntnisse über die Widget-Komposition in Flutter erforderlich
Könnte zusätzliche Styling für komplexe Themen benötigen
Geringe Dokumentation im Vergleich zu reifen Paketen
Am besten geeignet für Apps mit häufigen Benutzerauswahlen
Nicht ideal für einfache statische Auswahlmöglichkeiten ohne Interaktivität
Original-README
Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.
The successor to smart_select and chips_choice with cleaner, more flexible, and composable API for creating inline or prompted choice widgets with single or multiple selection.
Features
Cleaner, flexible, and composable API
Inline or prompted choice widget
Single or multiple choice widget
Searchable choice items with highlighted result
Specifies whether the choice selection needs to be confirmed
Use any type of choice data and load it easily, either synchronously or asynchronously
Build your own choice item that fits your needs
Groupable choice items that can be sorted
Supports leading and trailing choice items, as well as divider choice items
Use a predefined wrapped, scrollable, virtualized choice list, or build one that fits your needs
Use a predefined popup dialog, bottom sheet, new page prompt, or build one that fits your needs
Use a predefined modal header, footer, and separator, or build one that fits your needs
Use a predefined group list, group item, and group header, or build one that fits your needs
Use a predefined anchor widget or build one that fits your needs
Use a predefined widget on loading, on error, and placeholder when empty, or build one that fits your needs
By default, the choice controller maintains the selection state within a List. Any constructors other than those dedicated to single choice will have a List<T> for their value and onChanged prop. If we want to use a single value of T, we can use ChoiceSingle.value adapter to fill the value prop and ChoiceSingle.onChanged adapter to fill the onChanged prop.
Here is an example of how to use the ChoiceSingle.value and ChoiceSingle.onChanged adapters
:x: Sortable choice items better to do this outside
:black_square_button: Add scroll wheel list
:black_square_button: Add dropdown choice widget
:black_square_button: Add chainable choice widget
Sponsoring
If this package or any other package I created is helping you, please consider to sponsor me so that I can take time to read the issues, fix bugs, merge pull requests and add features to these packages.