list_extension 0.0.1 list_extension: ^0.0.1 copied to clipboard
Custom methods and propeties for List added via Dart extension.
example/list_extension_example.dart
import 'package:list_extension/list_extension.dart';
void main() {
final list = ['Jacob', 'Mia', 'Maria'];
print(list.hashCode);
list.add('João');
final copy = list.copy();
print(copy.hashCode);
for (var index in list.indices) {
if (index == list.lastIndex) {
print("Index: $index | Element: ${list[index]} <<<");
} else {
print("Index: $index | Element: ${list[index]}");
}
}
}