choice 2.3.2 choice: ^2.3.2 copied to clipboard
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.
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add choice
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
dependencies:
choice: ^2.3.2
Alternatively, your editor might support flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:choice/choice.dart';