Skip to content

mekkolodziejski/Flutter-SmartMultiSelect

Repository files navigation

SmartMultiSelect

Simple

SmartMultiSelect(
 values: cars,
)
List<Item> cars = [
  Item(id: 1, name: 'BMW'),
  Item(id: 2, name: 'Mercedes'),
  Item(id: 3, name: 'Toyota'),
  Item(id: 4, name: 'Nissan'),
  Item(id: 5, name: 'Ferrari'),
  Item(id: 6, name: 'Ford'),
  Item(id: 7, name: 'Chevrolet'),
];

User

SmartMultiSelect(
 titleNoSelectedItems: Text('Select cars', style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, color: Colors.yellow)),
 titleSelectedItems: Text('Selected cars', style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, color: Colors.yellow)),
 backgroundColor: Colors.red,
 chipBorderColor: Colors.yellow,
 chipColor: Colors.brown,
 chipHeight: 25,
 chipTextStyle: TextStyle(fontSize: 12),
 chipSelectedBorderColor: Colors.black54,
 chipSelectedColor: Colors.grey,
 chipSelectedHeight: 60,
 chipSelectedTextStyle: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
 buttonIcon: Icon(Icons.arrow_downward),
 bottomSheetBackgroundColor: Colors.red,
 buttonAcceptWidget: Text('Select'),
 initValues: [Item(id: 1, name: 'Audi'), Item(id: 13, name: 'Porsche'), Item(id: 8, name: 'Opel')],
 values: cars,
 onSelect: (value) {
  for(var itm in value) {
   print(itm.name);
  }
 },
 onDelete: (value) {
  for(var itm in value) {
   print(itm.name);
  }
 },
)
return MaterialApp(
 title: 'Flutter Demo',
 debugShowCheckedModeBanner: false,
 theme: ThemeData(
  primarySwatch: Colors.blue,
  canvasColor: Colors.transparent, // important to rounded bottom sheet
  ),
 home: MyHomePage(),
);

Screenshot_1621172443 Screenshot_1621172449

Screenshot_1621172455 Screenshot_1621172461

Screenshot_1621172693 Screenshot_1621172792

Screenshot_1621172798

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published