일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- ScrollView
- Dialog
- android
- livedata
- scroll
- 앱
- Compose
- 계측
- Flutter
- binding
- textfield
- DART
- intent
- viewmodel
- textview
- appbar
- 안드로이드
- Kotlin
- Navigation
- TEST
- Button
- drift
- activity
- CustomScrollView
- 테스트
- LifeCycle
- data
- 앱바
- Coroutines
- tabbar
- Today
- Total
목록크기 (2)
Study Record
🎁 LayoutBuilder 빌드 방식을 사용하면서 위젯을 완성하기 전에 위젯의 크기를 확인할 수 있는 위젯이다. builder 의 constraint.maxHeight 와 constraint.maxWidth 변수로 위젯의 너비와 높이를 알 수 있다. LayoutBuilder( builder: (BuildContext context, BoxConstraints constraint){ // LayoutBuilder 가 차지하고 있는 높이 constraint.maxHeight; // LayoutBuilder 가 차지하고 있는 너비 constraint.maxWidth; return Container(); } ) 예시 😶) 가로 스크롤의 ListView 에서 한 아이템이 한 스크롤 화면 당 3개의 항목을 보여주..
🎁 IntrinsicHeight Widget 무제한의 높이를 사용할 수 있고 자식 위젯이 무한 확장을 시도하여 보다 합리적인 높이로 크기를 조정하려는 경우에 유용하다. 비용이 많이 드는 위젯이므로 꼭 사용해야 할 때만 사용하는 게 좋다. 예를 들어, import 'package:flutter/material.dart'; void main() => runApp(MaterialApp(home: HomeScreen_Intrinsic())); class HomeScreen_Intrinsic extends StatelessWidget { const HomeScreen_Intrinsic({Key? key}) : super(key: key); @override Widget build(BuildContext conte..