Rephrase bool getter doc

We want to avoid the "Returns" phrasing for getters.

Change-Id: Ia738c1566f720200a7b65a4ff441e1196129a6f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210286
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
This commit is contained in:
Nate Bosch 2021-09-10 14:35:28 +00:00 committed by commit-bot@chromium.org
parent a3a7e2786c
commit 828d1904e5

View file

@ -412,12 +412,12 @@ abstract class Iterable<E> {
return count;
}
/// Returns `true` if there are no elements in this collection.
/// Whether this collection has no elements.
///
/// May be computed by checking if `iterator.moveNext()` returns `false`.
bool get isEmpty => !iterator.moveNext();
/// Returns true if there is at least one element in this collection.
/// Whether this collection has at least one element.
///
/// May be computed by checking if `iterator.moveNext()` returns `true`.
bool get isNotEmpty => !isEmpty;