Fixed length List

Dart, Flutter 2021. 1. 28. 13:07

728x90
void main() {
  //List<String> str = [];
  List<String> str = new List(3);
  str[0] = "aaa";
  str[1] = "b";
  List<String> str2 = new List.from(['aaa', 'b']);
}
반응형

댓글 0