Answers for "flutter list with strings"

1

flutter array of strings

//List of integers
List<int> intArr = [1,2,3,4,5];
print(intArr);
  
//List of strings
List<String> strArr = ['hello', 'world'];
print(strArr);  
  
// When use as Paramitter Default Value
List<String> strArr = const ['hello', 'world'];
Posted by: Guest on November-23-2021
0

Flutter list of strings to one String

var list = ['one', 'two', 'three'];
  var concatenate = StringBuffer();

  list.forEach((item){
    concatenate.write(item);
  });

  print(concatenate); // displays 'onetwothree'

  }
Posted by: Guest on April-29-2020

Code answers related to "flutter list with strings"

Code answers related to "Dart"

Browse Popular Code Answers by Language