Dart Programming - List.isEmpty Property



Returns true if the collection has no elements.

Syntax

List.isEmpty

Usage of isEmpty Property

Example

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

Output

It will produce the following output − .

False  
dart_programming_lists.htm
Advertisements