아래는 위젯·함수·스타일 타입을 이름 단위로 풀어 쓴 참고용 문서이다.
Color| 형태 | 설명 |
|---|---|
Colors.red 등 | 머티리얼 이름 색 |
Colors.orange.shade700 | shade 단계 |
Color(0xAARRGGBB) | ARGB 8자리 16진수 |
Color.fromRGBO(r,g,b, opacity) | r,g,b 0~255, opacity 0~1 |
Color.fromARGB(a,r,g,b) | a,r,g,b 0~255 |
theme.colorScheme.primary 등 | 테마에서 가져오기 |
TextStyle| 속성 | 의미·사용 |
|---|---|
inherit | 부모 DefaultTextStyle 상속 여부 (기본 true) |
color | 글자색 |
backgroundColor | 글자 뒤 배경색(문단 하이라이트 느낌) |
fontSize | 논리 픽셀 크기 |
fontWeight | FontWeight.w400 등 |
fontStyle | FontStyle.italic |
letterSpacing | 자간(음수 가능) |
wordSpacing | 단어 간격 |
height | 줄 높이 = fontSize × height에 가깝게 동작(배수처럼 씀) |
decoration | 밑줄 등 TextDecoration |
decorationColor / decorationStyle / decorationThickness | 장식 선 스타일 |
fontFamily | 폰트 패밀리명(pubspec 등록 필요) |
package | 패키지 폰트일 때 패키지명 |
overflow | 레거시. 보통 Text 위젯의 overflow 사용 |
leadingDistribution | 줄 앞쪽 분배(고급) |
debugLabel | 디버그용 |
FontWeight| 값 | 대략 |
|---|---|
w100 ~ w900 | Thin ~ Black |
normal | 400 |
bold | 700 |
EdgeInsets / EdgeInsetsGeometry| 생성자 | 의미 |
|---|---|
EdgeInsets.all(double) | 사방 동일 |
EdgeInsets.symmetric({horizontal, vertical}) | 대칭 |
EdgeInsets.only({left, top, right, bottom}) | 한쪽만 |
EdgeInsets.fromLTRB(l,t,r,b) | 네 방향 |
EdgeInsets.zero | 0 |
Alignment / FractionalOffsetAlignment.center, topLeft, bottomRight, Alignment(x,y) (-1~1)AlignmentDirectional — RTL 대응(start/end)BoxFit (Image, FittedBox 등)| 값 | 동작 |
|---|---|
fill | 비율 무시로 영역 채움 |
contain | 비율 유지, 전부 보임(여백 가능) |
cover | 비율 유지, 영역 덮음(잘림 가능) |
fitWidth / fitHeight | 한 축 맞춤 |
scaleDown | contain과 비슷하나 확대는 안 함 |
none | 원본 크기(넘치면 잘림) |
BoxDecoration (Container.decoration 등)| 속성 | 의미 |
|---|---|
color | 배경색(그라데이션과 동시 사용 시 규칙 확인) |
image | DecorationImage 배경 이미지 |
border | Border.all 등 테두리 |
borderRadius | BorderRadius.circular 등 |
boxShadow | 그림자 리스트 |
gradient | LinearGradient, RadialGradient |
shape | BoxShape.circle / rectangle |
clipBehavior | 클립 방식 |
BorderRadiusBorderRadius.circular(12), vertical, only, allButtonStyle (버튼 테마·style:)| 자주 쓰는 속성 | 의미 |
|---|---|
backgroundColor | WidgetStateProperty — 눌림·비활성 등 상태별 색 |
foregroundColor | 글자·아이콘 색 |
overlayColor | 스플래시·하이라이트 |
elevation | 그림자 높이 |
padding | 내부 패딩 |
minimumSize / fixedSize / maximumSize | 크기 제약 |
shape | RoundedRectangleBorder 등 |
textStyle | 버튼 안 텍스트 |
InputDecoration (TextField.decoration)| 속성 | 의미 |
|---|---|
labelText / label | 라벨(포커스 시 위로 올라감) |
hintText / hint | 비었을 때 힌트 |
helperText / errorText | 아래 도움말·에러 |
prefixIcon / suffixIcon | 앞뒤 아이콘 |
prefix / suffix | 아이콘 대신 위젯 |
prefixText / suffixText | 고정 문자(단위 등) |
border | 기본 테두리 |
enabledBorder / focusedBorder / errorBorder / focusedErrorBorder / disabledBorder | 상태별 테두리 |
filled + fillColor | 채워진 배경 |
contentPadding | 필드 내부 패딩 |
isDense | 컴팩트 모드 |
counterText | 글자 수 카운터 커스텀 |
Column / Row| 속성 | 의미 |
|---|---|
children | 자식 목록 |
mainAxisAlignment | 주축 정렬 (start,end,center,spaceBetween,spaceAround,spaceEvenly) |
crossAxisAlignment | 교차축 (start,end,center,stretch,baseline) |
mainAxisSize | min(내용 높이/너비), max(부모까지 확장 성향) |
verticalDirection | Column만: 위에서 아래 / 반대 |
textBaseline | crossAxisAlignment.baseline일 때 필요 |
Flex| 속성 | 의미 |
|---|---|
direction | Axis.horizontal / vertical |
| 나머지 | Column/Row와 동일 |
Expanded| 속성 | 의미 |
|---|---|
flex | 남는 주축 공간 나눌 비율(기본 1) |
child | 필수 |
Flexible| 속성 | 의미 |
|---|---|
flex | 비율 |
fit | tight(남는 만큼 꽉), loose(최소만) |
child | 필수 |
Spacer| 속성 | 의미 |
|---|---|
flex | Expanded 빈 칸과 비율 경쟁 |
SizedBox| 형태 | 의미 |
|---|---|
SizedBox({width, height, child}) | 고정 크기( null이면 제약 없음) |
SizedBox.shrink() | 최소 크기 |
SizedBox.expand({child}) | 부모 최대에 맞춤 |
Paddingpadding (필수), childCenterwidthFactor, heightFactor (Align 계열), childAlign| 속성 | 의미 |
|---|---|
alignment | Alignment |
widthFactor / heightFactor | 부모 대비 자식 영역 비율 |
Stack| 속성 | 의미 |
|---|---|
children | 아래에서 위로 그림 |
alignment | non-positioned 자식 기본 정렬 |
fit | loose / expand / passthrough |
clipBehavior | 넘침 클립 |
Positioned| 속성 | 의미 |
|---|---|
left right top bottom | Stack 좌표 |
width height | 명시 크기 |
child | 필수 |
Wrap| 속성 | 의미 |
|---|---|
direction | 가로/세로 흐름 |
spacing / runSpacing | 자식 간·줄 간 간격 |
alignment / runAlignment / crossAxisAlignment | 줄/행 정렬 |
Container| 속성 | 의미 |
|---|---|
alignment | child 작을 때 정렬 |
padding | EdgeInsets |
color | decoration 없을 때 빠른 배경색 |
decoration | BoxDecoration과 color 동시 사용 금지(규칙) |
foregroundDecoration | 앞에 그리는 데코 |
width height | 고정 크기 |
constraints | BoxConstraints |
margin | 바깥 여백 |
transform | Matrix4 변환 |
child | 단일 자식 |
ConstrainedBox / UnconstrainedBox / IntrinsicHeight / IntrinsicWidthConstrainedBox: constraints로 추가 제한UnconstrainedBox: 부모 제약 완화(주의 깊게 사용)IntrinsicHeight/IntrinsicWidth: 자식 내재 크기에 맞춤(비용 있음)LayoutBuilderbuilder: (context, constraints) => Widget — 부모 BoxConstraints로 반응형FittedBox| 속성 | 의미 |
|---|---|
fit | BoxFit |
alignment | 자식 정렬 |
child | 필수 |
AspectRatioaspectRatio: width/height 비, childFractionallySizedBox| 속성 | 의미 |
|---|---|
widthFactor heightFactor | 부모의 몇 % 너비/높이 |
alignment, child |
Builderbuilder: (context) => Widget — 새 BuildContext 필요할 때SingleChildScrollView| 속성 | 의미 |
|---|---|
child | 하나 |
scrollDirection | 가로/세로 |
controller | ScrollController |
physics | 스크롤 물리 |
padding |
ScrollController| 메서드/속성 | 의미 |
|---|---|
offset | 현재 스크롤 위치 |
jumpTo / animateTo | 이동 |
addListener | 스크롤 변화 감지 |
dispose | State에서 dispose 호출 |
ListView| 속성 | 의미 |
|---|---|
children | 적을 때 |
scrollDirection | |
controller | |
physics | NeverScrollableScrollPhysics 등 |
padding | |
shrinkWrap | 높이를 내용만큼만(부모 제약 이슈 시) |
itemExtent | 행 높이 고정(성능) |
ListView.builder| 속성 | 의미 |
|---|---|
itemCount | 개수(없으면 무한 빌드 가능 → 주의) |
itemBuilder | (context, index) => Widget |
findChildIndexCallback | 키 보존 등 고급 |
| 위와 동일 | controller, physics, padding, shrinkWrap, itemExtent 등 |
ListView.separateditemBuilder, separatorBuilder, itemCountGridView / GridView.builder| 속성 | 의미 |
|---|---|
gridDelegate | SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount, childAspectRatio, crossAxisSpacing, mainAxisSpacing) 또는 WithMaxCrossAxisExtent |
children / itemBuilder | 고정 vs 빌더 |
CustomScrollView| 속성 | 의미 |
|---|---|
slivers | Sliver 위젯 리스트 |
controller | |
scrollDirection | |
physics |
Sliver들| Sliver | 역할 |
|---|---|
SliverAppBar | 접히는/고정 앱바 (flexibleSpace, pinned, floating, snap, expandedHeight) |
SliverToBoxAdapter | 일반 위젯 하나 |
SliverList | SliverChildListDelegate 또는 SliverChildBuilderDelegate |
SliverGrid | SliverGridDelegate |
SliverPadding | 슬라이버 패딩 |
SliverFillRemaining | 남는 세로 채움 |
SliverPersistentHeader | 고정/스크롤 헤더(고급) |
NestedScrollView| 속성 | 의미 |
|---|---|
headerSliverBuilder | 상단 Sliver들 |
body | 보통 TabBarView 등 |
PageView| 속성 | 의미 |
|---|---|
children 또는 PageView.builder | |
controller | PageController(initialPage 등) |
onPageChanged | 인덱스 |
scrollDirection |
DraggableScrollableSheet| 속성 | 의미 |
|---|---|
builder | (context, scrollController) => Widget |
initialChildSize | 처음 높이 비율(0~1) |
minChildSize / maxChildSize | |
expand |
Text| 속성 | 의미 |
|---|---|
data | 문자열(생성자) |
style | TextStyle |
textAlign | |
textDirection | RTL |
locale / softWrap / overflow / textScaleFactor | |
maxLines | |
semanticsLabel | 접근성 |
Text.richTextSpan 트리(자식에 TextSpan 재귀)DefaultTextStyleText에 기본 스타일.mergeTextEditingController| 메서드/속성 | 의미 |
|---|---|
text | 현재 문자열 |
selection | 커서·선택 범위 |
addListener | 변경 감지 |
dispose | 해제 필수 |
TextField| 속성 | 의미 |
|---|---|
controller | |
focusNode | FocusNode |
decoration | InputDecoration |
keyboardType | |
textInputAction | 엔터키 동작 |
textCapitalization | 대문자화 |
style | 입력 글자 스타일 |
strutStyle | 줄 간격 세밀 |
textAlign / textAlignVertical | |
autofocus | |
readOnly | |
showCursor | |
maxLines / minLines | |
maxLength | |
onChanged / onSubmitted / onEditingComplete | |
inputFormatters | 숫자만 등 필터 |
cursorWidth / cursorRadius |
TextFormFieldTextField + validator, onSaved 등 폼 연동Formkey: GlobalKey<FormState> → validate(), save(), reset()FocusNode / Focus / FocusScoperequestFocus(), unfocus(), FocusScope.of(context).nextFocus()Image.asset| 속성 | 의미 |
|---|---|
name | 경로 |
bundle | 기본 번들 |
scale | |
width height | |
fit | BoxFit |
color / colorBlendMode | 틴트 |
errorBuilder |
Image.network| 속성 | 의미 |
|---|---|
src | URL |
headers | HTTP 헤더 |
loadingBuilder | 로딩 중 |
errorBuilder | 실패 |
cacheWidth cacheHeight | 메모리 디코드 크기 제한 |
Iconicon, size, color, semanticLabelScaffold| 속성 | 의미 |
|---|---|
appBar | PreferredSizeWidget |
body | |
floatingActionButton | |
floatingActionButtonLocation | |
drawer / endDrawer | |
bottomNavigationBar | |
persistentFooterButtons | |
resizeToAvoidBottomInset | 키보드 올라올 때 리사이즈 |
backgroundColor |
AppBar| 속성 | 의미 |
|---|---|
title | |
leading | 뒤로 등 |
actions | IconButton 리스트 |
bottom | TabBar 등 |
elevation / scrolledUnderElevation | |
backgroundColor / foregroundColor | |
centerTitle |
Material| 속성 | 의미 |
|---|---|
color / shape / elevation | |
shadowColor | |
clipBehavior | |
child |
InkWell / InkResponse| 속성 | 의미 |
|---|---|
onTap onLongPress onDoubleTap 등 | |
splashColor highlightColor | (테마에 맡기기도 함) |
borderRadius | 스플래시 모양 |
child |
GestureDetector| 속성 | 의미 |
|---|---|
onTap onLongPress onPanUpdate 등 | |
behavior | HitTestBehavior |
showModalBottomSheet| 파라미터 | 의미 |
|---|---|
context | |
builder | (context) => Widget |
backgroundColor | |
elevation | |
shape | RoundedRectangleBorder |
isScrollControlled | true면 전체 높이 커스텀 쉬움 |
enableDrag | 드래그로 닫기 |
isDismissible | 바깥 탭 닫기 |
barrierColor | 뒤 어둡게 |
showDialog| 파라미터 | 의미 |
|---|---|
builder | 다이얼로그 내용 |
barrierDismissible |
AlertDialog / SimpleDialogtitle, content, actions, icon 등Overlay / OverlayEntryOverlayEntry(builder: (context) => Widget)insert / remove — 제거 누락 주의Navigator.push 등Route 객체: MaterialPageRoute(builder: ...), CupertinoPageRouteHero| 속성 | 의미 |
|---|---|
tag | 화면 간 유일해야 함 |
child |
AnimatedContainer / AnimatedOpacity / AnimatedAlign 등| 공통 | 의미 |
|---|---|
duration | |
curve | Curves.easeIn 등 |
| 애니메이션 대상 속성 | 각 위젯별 |
AnimationControllervsync: TickerProvider, duration, forward(), reverse(), dispose() 필수Tween + AnimatedBuilderanimation: controller.drive(Tween) 형태AnimatedSwitcher| 속성 | 의미 |
|---|---|
child | 바뀌면 전환 |
duration | |
transitionBuilder | 커스텀 전환 |
CustomPaint| 속성 | 의미 |
|---|---|
painter | CustomPainter? |
foregroundPainter | 앞 레이어 |
child | 아래에 그릴 위젯 |
size | CustomPaint 단독일 때 |
CustomPainterpaint(Canvas canvas, Size size), shouldRepaint(covariant CustomPainter oldDelegate)SafeAreaminimum, left right top bottom 등으로 패딩 제어RepaintBoundarychild — 리페인트 격리WillPopScope / PopScopeNotificationListeneronNotification — 스크롤 노티 등AbsorbPointer / IgnorePointerabsorbing / ignoringInteractiveViewer| 속성 | 의미 |
|---|---|
minScale maxScale | |
panEnabled scaleEnabled | |
child |
| 목적 | 위젯/함수 |
|---|---|
| 세로/가로 나열 | Column / Row |
| 남는 공간 | Expanded / Spacer / Flexible |
| 겹침 | Stack + Positioned |
| 스크롤 한 덩어리 | SingleChildScrollView |
| 긴 리스트 | ListView.builder |
| 앱바+리스트 한 스크롤 | CustomScrollView + Sliver |
| 입력 | TextField + InputDecoration |
| 모달 시트 | showModalBottomSheet |
| 화면 전환 | Navigator + Route |
| 직접 그림 | CustomPaint |