Dart Programming - List isEmpty Method



Returns true if the collection has no elements.

Syntax

List.isEmpty

Example

void main() { 
   var lst = new List(); 
   lst.add(12); 
   lst.add(13); 
   print(lst.isEmpty); 
}  

It will produce the following output −.

False  
dart_programming_lists.htm
Advertisements