for (var i = 0; i < n; i++) for counting, for (final x in items) to walk a collection, and list.indexed (Dart 3) when you need both the index and the value.final result = switch (value) { pattern => result, _ => fallback }; evaluates to a value, and the compiler checks that every case is covered.Try Bugsee for free — no commitments, no hidden fees.