FittedBox
자식 위젯들의 크기를 부모의 크기에 따라 어떻게 맞출 것인가
Constructor
FittedBox({Key? key, BoxFit fit = BoxFit.contain, AlignmentGeometry alignment = Alignment.center, Clip clipBehavior = Clip.none, Widget? child})
Properties
- alignment(AlignmentGeometry)
- child(Widget?)
- clipBehavior(Clip)
- fit(BoxFit)
- fill, contain, cover, fitWidth, fitHeight, none등 사용하여 부모의 크기에 따라 배치됨
FractionallySizedBox
자식위젯의 가능한 공간안에서 크기를 조절한다.
Constructor
FractionallySizedBox({Key? key, AlignmentGeometry alignment = Alignment.center, double? widthFactor, double? heightFactor, Widget? child})
Properties
- alignment(AlignmentGeometry)
- child
- heightFactor(double?)
- 1.0이면 부모의 높이와 동일 0.5라면 절반이다
- widthFactor(double?)
- 1.0이면 부모의 너비와 동일 0.5라면 절반이다
LimitedBox
부모의 높이나 넓이가 무제한 일 때 사용한다.
자식의 크기를 제한할 수 있다.
무한 스크롤의 리스트 뷰일 때 유용하다.
Constructor
LimitedBox({Key? key, double maxWidth = double.infinity, double maxHeight = double.infinity, Widget? child})
Properties
- child(Widget?)
- maxHeight(double)
- BoxConstraints.maxHeight 제약 조건이 없는 경우 적용할 최대 높이 제한
- maxWidth(double)
- BoxConstraints.maxWidth 제약 조건이 없는 경우 적용할 최대 너비 제한