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
- Flutter
- textview
- Kotlin
- binding
- intent
- 앱
- android
- livedata
- 테스트
- TEST
- Coroutines
- scroll
- appbar
- drift
- ScrollView
- activity
- CustomScrollView
- Button
- DART
- 앱바
- Compose
- textfield
- Dialog
- 계측
- 안드로이드
- Navigation
- data
- LifeCycle
- tabbar
- viewmodel
Archives
- Today
- Total
목록Scope (1)
Study Record
[Kotlin] Scope Function
Apply 함수 - 객체의 확장 함수이다. - this를 통해 접근이 가능하다. ( this 생략 가능 ) - 외부에서 객체의 프로퍼티에 접근할 수 있다. - 반환값이 자기 자신이 된다. - 주로 객체를 초기화할 때 사용한다. val person = Person().apply { firstName = "Fast" lastName = "Campus" } Also 함수 - 객체가 파라미터로 전달된다. - 객체가 변수에 할당되기도 전에 객체에서 호출할 수 있다. - 람다의 입력값으로 오게 된다. - 파라미터명을 생략하면 it으로 받는다. - 객체의 유효성을 확인하거나 디버깅하는 용도로 사용된다. Random.nextInt(100).also { print("value : $it") } Random.nextInt..
안드로이드/Kotlin
2022. 4. 5. 22:14