pluto_filtered_list 0.0.1-alpha.0 copy "pluto_filtered_list: ^0.0.1-alpha.0" to clipboard
pluto_filtered_list: ^0.0.1-alpha.0 copied to clipboard

outdated

A List where filters can be applied to the List and elements can be accessed or modified in that state.

example/pluto_filtered_list_example.dart

import 'package:pluto_filtered_list/pluto_filtered_list.dart';

void main() {
  var filteredList = FilteredList<String>();
  // or set with initialList.
  // FilteredList(initialList: [1, 2, 3]);

  filteredList.add('one');

  print(filteredList); // ['one']

  filteredList.addAll(['two', 'three', 'four', 'five']);

  print(filteredList); // ['one', 'two', 'three', 'four', 'five']

  filteredList.setFilter((element) => element.length == 4); // ['four', 'five']

  print(filteredList.length); // 2

  print(filteredList[0]); // 'four'

  print(filteredList[1]); // 'five'

  filteredList.setFilter(null); // ['one', 'two', 'three', 'four', 'five']

  print(filteredList.length); // 5

  print(filteredList[0]); // 'one'

  print(filteredList[1]); // 'two'
}
16
likes
0
pub points
30%
popularity

Publisher

verified publisherweblaze.dev

A List where filters can be applied to the List and elements can be accessed or modified in that state.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

collection

More

Packages that depend on pluto_filtered_list