isEmpty property
bool
get
isEmpty
Whether this collection has no elements.
May be computed by checking if iterator.moveNext()
returns false
.
このコレクションに要素がないかどうかを調べます。
iterator.moveNext()
が false
を返すかどうかを確認することで計算できます。
Example:
final emptyList = <int>[];
print(emptyList.isEmpty); // true;
print(emptyList.iterator.moveNext()); // false
Returns true
if itself is Null.
自身がNullな場合はtrue
を返します。
Implementation
bool get isEmpty {
if (this == null) {
return true;
}
return this!.isEmpty;
}