Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

declaring and initializing a list in dart

import 'dart:core';

void main() {

  //List of integers
  List<int> intArr = [1,2,3,4,5];
  print(intArr);
  
  //List of strings
  List<String> strArr = ['hello', 'world'];
  print(strArr);  
  
}
 
PREVIOUS NEXT
Tagged: #declaring #initializing #list #dart
ADD COMMENT
Topic
Name
3+5 =