일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- family control
- UIKit
- React
- OpenCV
- C++
- 스위프트
- useEffect
- dart
- Computer Vision
- 회고
- SwiftUI
- 공식문서
- Git
- Xcode
- 중도휴학
- Flutter codelab
- vscode
- IOS
- Simulator
- Ai
- 애플로그인구현하기
- 한글
- Center
- git error
- 다짐
- codelab
- Column
- 휴학
- FLUTTER
- Swift
Archives
- Today
- Total
ram2 🚗
[Flutter] CustomSingleChildLayout 정리 본문
728x90
반응형
CustomSingleChildLayout
childe의 레이아웃을 지정하는 위젯이다.
- delegate은 child 레이아웃의 constraints를 결정할 수 있다. 또한 child를 어디에 둘지, parent의 크기를 결정한다. 하지만 parent는 child의 크기에 의존하지 않는다.
- CustomSingleChildLayout은 delegate를 지정해야 한다.
- 주로 grid를 만들 때 쓰인다.
정리하면, child의 위치, 크기를 결정할 때 사용하는 layout 중 하나이다.
example 1)
const CustomSingleChildLayout({
Key key,
@required this.delegate,
Widget child,
})
example 2)
Widget single(){
return CustomSingleChildLayout(delegate: delegate)
}
728x90
반응형
'💧 flutter' 카테고리의 다른 글
[Flutter] FractionallySizedBox class 정리 (0) | 2022.07.06 |
---|---|
[Flutter] FittedBox Class 정리 (0) | 2022.07.06 |
[Flutter] Initializer lists 정리 (0) | 2022.07.06 |
[Flutter] Using this in a constructor 에 대하여 (0) | 2022.07.06 |
[Flutter] Exceptions 이란!? (0) | 2022.07.06 |