Flutter 레이아웃 메커니즘의 핵심은 위젯입니다. Flutter에서는 거의 모든 것이 위젯이고 심지어 레이아웃 모델도 위젯이죠. Flutter 앱 내에서 볼 수 있는 이미지, 아이콘, 글자 모두 위젯입니다. 하지만 row, column, grid 같이 볼 수 없는 위젯들도 있는데요. 이들은 보이는 위젯들을 제어하고, 제한하며, 정렬시켜줍니다.

Container
자식 위젯들을 커스터마이징할 수 있는 위젯 클래스
여백, 간격, 테두리 또는 배경색을 추가하고 싶을 때 사용
Icon의 색상 - color 속성
폰트, 색상, 굵기 - Text.style 속성
Layout widgets
Single-child layout widgets
Align class - widgets library - Dart API
A widget that aligns its child within itself and optionally sizes itself based on the child's size. For example, to align a box at the bottom right, you would pass this box a tight constraint that is bigger than the child's natural size, with an alignment
api.flutter.dev
A widget that aligns its child within itself and optionally sizes itself based on the child's size.
A widget that attempts to size the child to a specific aspect ratio.
A widget that positions its child according to the child's baseline.
A widget that centers its child within itself.
A widget that imposes additional constraints on its child.
Container class - widgets library - Dart API
A convenience widget that combines common painting, positioning, and sizing widgets. A container first surrounds the child with padding (inflated by any borders present in the decoration) and then applies additional constraints to the padded extent (incorp
api.flutter.dev
A convenience widget that combines common painting, positioning, and sizing widgets.
A widget that defers the layout of its single child to a delegate.
Scales and positions its child within itself according to fit.
A widget that sizes its child to a fraction of the total available space. For more details about the layout algorithm, see RenderFractionallySizedOverflowBox.
A widget that sizes its child to the child's intrinsic height.
A widget that sizes its child to the child's intrinsic width.
A box that limits its size only when it's unconstrained.
A widget that lays the child out as if it was in the tree, but without painting anything, without making the child available for hit testing, and without taking any room in the parent.
A widget that imposes different constraints on its child than it gets from its parent, possibly allowing the child to overflow the parent.
A widget that insets its child by the given padding.
A box with a specified size. If given a child, this widget forces its child to have a specific width and/or height (assuming values are permitted by this widget's parent). If either the width or height is null, this widget will size itself to match the child's size in that dimension.
A widget that is a specific size but passes its original constraints through to its child, which will probably overflow.
A widget that applies a transformation before painting its child.
Multi-child layout widgets
Layout a list of child widgets in the vertical direction.
A widget that uses a delegate to size and position multiple children.
Expanded class - widgets library - Dart API
A widget that expands a child of a Row, Column, or Flex so that the child fills the available space. Using an Expanded widget makes a child of a Row, Column, or Flex expand to fill the available space along the main axis (e.g., horizontally for a Row or ve
api.flutter.dev
A widget that expands a child of a Row, Column, or Flex.
A widget that implements the flow layout algorithm.
GridView class - widgets library - Dart API
A scrollable, 2D array of widgets. The main axis direction of a grid is the direction in which it scrolls (the scrollDirection). The most commonly used grid layouts are GridView.count, which creates a layout with a fixed number of tiles in the cross axis,
api.flutter.dev
A grid list consists of a repeated pattern of cells arrayed in a vertical and horizontal layout. The GridView widget implements this component.
A Stack that shows a single child from a list of children.
Builds a widget tree that can depend on the parent widget's size.
A widget that arranges its children sequentially along a given axis, forcing them to the dimension of the parent in the other axis.
ListView class - widgets library - Dart API
A scrollable list of widgets arranged linearly. ListView is the most commonly used scrolling widget. It displays its children one after another in the scroll direction. In the cross axis, the children are required to fill the ListView. If non-null, the ite
api.flutter.dev
A scrollable, linear list of widgets. ListView is the most commonly used scrolling widget. It displays its children one after another in the scroll direction. In the cross axis, the children are required to fill the ListView.
Row class - widgets library - Dart API
A widget that displays its children in a horizontal array. To cause a child to expand to fill the available horizontal space, wrap the child in an Expanded widget. The Row widget does not scroll (and in general it is considered an error to have more childr
api.flutter.dev
Layout a list of child widgets in the horizontal direction.
Stack class - widgets library - Dart API
A widget that positions its children relative to the edges of its box. This class is useful if you want to overlap several children in a simple way, for example having some text and an image, overlaid with a gradient and a button attached to the bottom. Ea
api.flutter.dev
This class is useful if you want to overlap several children in a simple way, for example having some text and an image, overlaid with a gradient and a button attached to the bottom.
A widget that uses the table layout algorithm for its children.
A widget that displays its children in multiple horizontal or vertical runs.
'Dev' 카테고리의 다른 글
| push vs concat vs for loop (0) | 2022.09.16 |
|---|---|
| style vs contentContainerStyle in ScrollView (0) | 2022.09.13 |
| [React Navigation v6] TS2339: Property '..' does not exist on type 'Readonly<{.. } | {.. }>' (0) | 2022.09.13 |
| 자료구조와 알고리즘, 시간복잡도/공간복잡도 (Big O) (0) | 2022.09.13 |
| Flutter와 Dart (0) | 2022.09.06 |



