Dart Programming – ListFirst Method

  • Post author:
  • Post category:Dart
  • Post comments:1 Comment
Dart Programming listfirst method

In this guide, we will discuss ListFirst Method in Dart Programming Language. This property returns the first element in the list.

Syntax

List.first

Example

void main() { 
   var lst = new List(); 
   lst.add(12); 
   lst.add(13); 
   print("The first element of the list is: ${lst.first}"); 
}  

It will produce the following output −.

The first element of the list is: 12  

Next Topic : Click Here

This Post Has One Comment

Leave a Reply