Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 테스트
- textfield
- appbar
- Dialog
- ScrollView
- 계측
- Flutter
- textview
- LifeCycle
- Kotlin
- Navigation
- drift
- 안드로이드
- Button
- 앱
- data
- binding
- android
- activity
- 앱바
- tabbar
- viewmodel
- TEST
- Compose
- livedata
- CustomScrollView
- Coroutines
- scroll
- intent
- DART
Archives
- Today
- Total
Study Record
[Dart] .. 본문
728x90
✍ ..
"." 을 사용해서 함수를 실행하고 return 값으로 실행한 함수의 return 값이 반환된다. 하지만 ".." 은 리턴값으로 함수를 실행한 대상이 리턴된다.
int a = 3;
String aStr = a.toString();
final aInt = a..toString();
// true
print(aInt is int);
a = 5;
print(aInt); // 3
print(a); // 5
위의 예시와 같이 a.toString() 을 했을 때 toString() 의 리턴값은 String 인데 a..toString() 하면 a 를 리턴받아 aInt 의 타입은 int 이 된다.
728x90
'Dart' 카테고리의 다른 글
[Dart] Enum type (0) | 2023.03.16 |
---|---|
[Dart] 간결한 if 문 (c ? ep1 : ep2 , ep1 ?? ep2) (0) | 2023.03.16 |
[Dart] 난수 생성하기 (0) | 2023.02.05 |
[Dart] 비동기 프로그래밍 (0) | 2023.01.16 |
[Dart] 함수형 프로그래밍 (0) | 2023.01.15 |