data_filters 0.0.2 copy "data_filters: ^0.0.2" to clipboard
data_filters: ^0.0.2 copied to clipboard

outdated

Add Filters to your existing data

Features #

Converts your existing data into Filters.

Usage #

Check out example code in /example folder.

Your main data must be arranged like below.

List<List> data = [
    ['red', 'dog', 'small', 'bark'],
    ['green', 'cat', 'medium', 'meow'],
    ['blue', 'fish', 'large', 'swim'],
    ['red', 'cat', 'small', 'meow'],
    ['yellow', 'dog', 'large', 'bark'],
    ['green', 'fish', 'medium', 'swim'],
    ['blue', 'dog', 'medium', 'bark'],
    ['red', 'fish', 'large', 'swim'],
    ['yellow', 'cat', 'small', 'meow'],
    ['green', 'dog', 'small', 'bark'],
    ['blue', 'cat', 'large', 'meow'],
    ['red', 'fish', 'medium', 'swim'],
    ['yellow', 'dog', 'medium', 'bark'],
    ['green', 'fish', 'large', 'swim'],
    ['blue', 'cat', 'small', 'meow'],
    ['red', 'dog', 'small', 'bark'],
    ['yellow', 'cat', 'medium', 'meow'],
    ['green', 'fish', 'small', 'swim'],
    ['blue', 'dog', 'large', 'bark'],
    ['red', 'cat', 'medium', 'meow'],
  ];


Selected filters will be stored in form of index

List<int>? filterIndex;

This code builds a filters ui

        DataFilters(
            data: data,
            filterTitle: const ['Color', 'Animal', 'Size', 'Sound'],
            recent_selected_data_index: (List<int>? index) {
              setState(() {
                filterIndex = index;
              });
            },
            style: FilterStyle(
              buttonColor: Colors.red,
              filterBorderColor: Colors.grey,
            ),
          ),
5
likes
0
points
77
downloads

Publisher

unverified uploader

Weekly Downloads

Add Filters to your existing data

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on data_filters