Dart Programming - List.isNotEmpty Property



Returns true if the collection has at least one element.

Syntax

List.isNotEmpty

Usage of isNotEmpty Property

Example

void main() { 
   var lst = []; 
   lst.add(12); 
   lst.add(13); 
   print(lst.isNotEmpty); 
}  

Output

It will produce the following output −.

true  
dart_programming_lists.htm
Advertisements