LzListExtension<T> extension
Extends the functionality of the List<T> class with additional methods and properties.
- on
-
- List<
T>
- List<
Methods
-
chunk(
List< int> sizes) → List<List< T> > -
Available on List<
Splits the list into chunks based on the specified sizes.T> , provided by the LzListExtension extension -
generate<
E> (E generator(T item, int i)) → List< E> -
Available on List<
T> , provided by the LzListExtension extensionList<int> numbers = [1, 2, 3, 4, 5]; numbers.generate((item, i) => Text(item.toString()));
-
getRandom(
[int length = 1]) → List< T> -
Available on List<
T> , provided by the LzListExtension extension['a', 'b', '4', 'e', '1'].getRandom() // ['e']
-
updateWhere(
bool condition(T e), dynamic data, {dynamic onFail()?}) → void -
Available on List<
T> , provided by the LzListExtension extension[{'id': 1, 'name': 'John Doe'}].updateWhere((e) => e.id == 1, (data, index) => data[index]['name'] = 'Jane Doe')