[Flutter Layout]Offstage , OverFlowBox

김기현·2025년 3월 6일

Flutter Layout

목록 보기
7/8

Offstage

Flutter Offstage
위젯을 숨길 때 사용한다.
숨겨도 위젯은 작동하기 때문에 배터리나 cpu를 사용한다.

Constructor

Offstage({Key? key, bool offstage = true, Widget? child})

Properties

  • child
  • offstage(bool)
    • 숨길 것인지 아닌지 true라면 숨긴다.

OverFlowBox

OverFlowBox
부모의 제약과 상관없이 부모의 크기보다 커질수 있는 위젯

Constructor

OverflowBox({Key? key, AlignmentGeometry alignment = Alignment.center, double? minWidth, double? maxWidth, double? minHeight, double? maxHeight, OverflowBoxFit fit = OverflowBoxFit.max, Widget? child})

Properties

  • alignment(AlignmentGeometry)
    • 어떻게 자식을 배치할 것인가
  • child
  • fit(OverflowBoxFit) - max(부모가 허락하는 만큼 커진다.) deferToChild(자식의 크기만큼 커진다.)
  • maxHeight(double?)
  • maxWidth(double?)
  • minHeight(double?)
  • minWidth(double?)
    • null이라면 부모의 제약을 사용한다.

0개의 댓글