From c9b788e1ba8fb6d9f4cf9c4ba0c15029fe29386b Mon Sep 17 00:00:00 2001 From: Binni Goel <41873024+droidbg@users.noreply.github.com> Date: Tue, 24 Oct 2023 20:24:11 +0530 Subject: [PATCH] Fix. typos in _util.dart (#161) --- pkgs/leak_tracker/lib/src/shared/_util.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/leak_tracker/lib/src/shared/_util.dart b/pkgs/leak_tracker/lib/src/shared/_util.dart index 9d8b3cd6..080e3433 100644 --- a/pkgs/leak_tracker/lib/src/shared/_util.dart +++ b/pkgs/leak_tracker/lib/src/shared/_util.dart @@ -6,14 +6,14 @@ T cast(Object? value) { if (value is T) return value; throw ArgumentError( - '$value is of type ${value.runtimeType} that is not subtype of $T', + '$value is of type ${value.runtimeType} that is not a subtype of $T', ); } extension IterableExtensions on Iterable { - /// Returns the item or null, assuming that the length of the itrable os 0 or 1. - // The name is consistent woth other methods names on iterable like - // `firstOrNull, lastOrNull and singleOrNull`. + /// Returns the item or null, assuming that the length of the iterable is 0 or 1. + // The name is consistent with other method names on iterables like + // `firstOrNull, lastOrNull, and singleOrNull`. T? get onlyOrNull { if (length > 1) throw StateError('Length should not be more than one.'); return firstOrNull;