# listView method

FutureBuilder<List<QuickActionItem?>> listView(

1. {String? filter}

)

## Implementation

    FutureBuilder<List<QuickActionItem?>> listView({String? filter}) {
      return FutureBuilder(
          future: _getQuickActionsFromRepo(),
          builder: (BuildContext context,
              AsyncSnapshot<List<QuickActionItem?>> snapshot) {
            if (snapshot.connectionState == ConnectionState.done &&
                snapshot.hasData) {
              return ListView.builder(
                  itemCount: snapshot.data!.length,
                  itemBuilder: (BuildContext context, int index) {
                    if (snapshot.data![index] == null ||
                        (filter != null &&
                            filter.isNotEmpty &&
                            (!snapshot.data![index]!.name
                                    .toLowerCase()
                                    .contains(filter.toLowerCase()) &&
                                !snapshot.data![index]!.description
                                    .toLowerCase()
                                    .contains(filter.toLowerCase())))) {
                      return Container();
                    }
                    var data = snapshot.data![index]!;
                    return Hoverable(
                      child: ListTile(
                        tileColor: ButtonState.all(selectedList.contains(data)
                            ? AppTheme().color.withOpacity(0.5)
                            : Colors.transparent),
                        title: Text(data.name),
                        subtitle: Text(data.description),
                        onPressed: () => toggleItem(data),
                      ),
                    );
                  });
            } else if (snapshot.connectionState == ConnectionState.waiting) {
              return const Center(child: ProgressRing());
            } else {
              return Center(child: Text('errordownloading-text'.i18n()));
            }
          });
    }