Answers for "initialize list in flutter"

7

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);  
  
}
Posted by: Guest on June-04-2020

Code answers related to "Dart"

Browse Popular Code Answers by Language