일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- animation
- 클래스
- texttheme
- DART
- variable
- python
- map
- crawler
- Collection
- textstyle
- import
- kotlin
- 웹크롤러
- Android
- ML
- function
- package
- 함수
- Class
- 코틀린
- pushnamed
- List
- 콜렉션
- set
- 다트
- 크롤러
- Flutter
- text
- 플러터
- 파이썬
- Today
- Total
목록constructor (2)
조용한 담장

Dart 의 collections 자료형 클래스인 List, Set, Map 을 살펴보자. List List class List 는 두가지 타입이 있다. 길이 고정된 리스트 : 리스트의 길이를 변경하는 동작에 에러를 발생시킨다. new List(n), List(n) 길이 증가 가능한 리스트. List(), [] Constructors List([int length ]) : length 길이의 null 로 채워진 리스트를 생성한다. List.filled(int length, E fill, { bool growable: false }) : 각 element 가 fill 값을 length 길이의 리스트를 생성한다. List.from(Iterable elements, { bool growable: true })..

Dart Class Dart language tour class ClassName { } var myClass = ClassName(); Class members ., ?. var p = Point(2, 2); p.y = 3; assert(p.y == 3); num distance = p.distanceTo(Point(4, 4)); // If p is non-null, set its y value to 4. p?.y = 4; Constructor constructor 를 선언하지 않으면 기본적으로 Default constructor 가 생긴다. Default constructor 는 클래스 이름과 동일한 이름을 가지고 argument 가 없다. constructor는 상속되지 않는다. var p1 = P..