enfasio
enfasio

Reputation: 25

Flutter FireStore in ListView with DropDown Filter

I wanted to get data from firestore in my Listview,

But,
By selecting something from the drop-down menu I would like to display the names of the collections in the Listview.

That's all I want now, thanks !🙂

Upvotes: 1

Views: 542

Answers (1)

Kab Agouda
Kab Agouda

Reputation: 7279

Try this package dropdown_search

Add this to your package's pubspec.yaml file:

dependencies:
  dropdown_search: 

Import

import 'package:dropdown_search/dropdown_search.dart';

Simple implementation

  DropdownSearch<String>(
    mode: Mode.MENU,
    showSelectedItem: true,
    items: ["Brazil", "Italia (Disabled)", "Tunisia", 'Canada'],
    label: "Menu mode",
    hint: "country in menu mode",
    popupItemDisabled: (String s) => s.startsWith('I'),
    onChanged: print,
    selectedItem: "Brazil"),

You can learn more about this package here

Flutter simple and robust DropdownSearch with item search feature, making it possible to use an offline item list or filtering URL for easy customization.

enter image description here

Upvotes: 2

Related Questions