indexed_iterable 1.0.1 copy "indexed_iterable: ^1.0.1" to clipboard
indexed_iterable: ^1.0.1 copied to clipboard

outdated

A simple delegate representing `Iterable` with index.

example/indexed_iterable_example.dart

import 'package:indexed_iterable/indexed_iterable.dart';

void main() {
  final testSet = {1, 2, 3, 4, 5, 6, 7};
  final testList = [1, 2, 3, 4, 5, 6, 7];
  print('Test 1');
  for (final it in IndexedIterable(testSet)) {
    print(it);
  }
  print('Test 2');
  for (final it in IndexedIterable(testList)) {
    print(it);
  }
  print('Test 3');
  for (final it in II({'hi': 2})) {
    // Because `map` is not a `Iterable`, this loop does not proceed.
    print(it);
  }

  print('Test 4');
  for (final it in testList.ii) {
    print(it);
  }
}
1
likes
0
pub points
14%
popularity

Publisher

verified publishergihwan.com

A simple delegate representing `Iterable` with index.

Homepage

License

unknown (LICENSE)

More

Packages that depend on indexed_iterable