Dart Programming - List.isNotEmpty Method


Advertisements

Returns true if the collection has at least one element.

Syntax

List.isNotEmpty

Example

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

It will produce the following output −.

true  
dart_programming_lists.htm
Advertisements