Flutter

Layouts & Constraints

Row, Column, Stack, Flex, Expanded, Flexible, constraints, BoxConstraints, LayoutBuilder

24 면접 질문·
Mid-Level
1

Which widget should be used to arrange children horizontally in Flutter?

답변

Row is the fundamental widget for arranging children horizontally along the main axis. It respects its parent's constraints and distributes space according to mainAxisAlignment and crossAxisAlignment properties. For vertical layouts, Column is the equivalent.

2

Which Row or Column property controls the distribution of children along the main axis?

답변

mainAxisAlignment controls how children are positioned along the main axis (horizontal for Row, vertical for Column). Options include start, center, end, spaceBetween, spaceAround, and spaceEvenly. crossAxisAlignment controls positioning on the perpendicular axis.

3

What is the main difference between Expanded and Flexible?

답변

Expanded forces its child to fill all available space (fit: FlexFit.tight), while Flexible allows the child to take the space it needs up to the maximum available (fit: FlexFit.loose by default). Expanded is actually a Flexible with fit: FlexFit.tight.

4

How does Stack position its children by default?

5

Which widget should be used to position a child at a specific location within a Stack?

+21 면접 질문

다음 면접을 위해 Flutter을 마스터하세요

모든 질문, flashcards, 기술 테스트, 코드 리뷰 연습, 면접 시뮬레이터에 접근하세요.

무료로 시작하기