Last updated:
0 purchases
list extension
list_extension #
Custom methods and propeties for List added via Dart extension.
Install #
Added in project's pubspec:
dependencies:
list_extension: any
...
copied to clipboard
Usage #
indices: Return a list with all indices.
final list = ['hello', 'test'];
for(var index in list.indices){
print("Index: $index | Value: ${list[index]}");
}
copied to clipboard
copy: Create a new instance of list with the same items.
final list = ['hello', 'test'];
final copy = list.copy();
print(list.hashCode == copy.hashCode); // false
copied to clipboard
lastIndex: The number of last index in this list.
final list = ['hello', 'test'];
print(list.lastIndex); // 1
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.