1. Text 위젯을 역할
문자열을 담을 수 있는 위젯.
2. Text 위젯의 Style 속성
Text 위젯의 문서를 보면 텍스트에 대한 다양한 스타일 속성이 있는 것을 확인할 수 있다.

3. Text 위젯의 Style 속성 사용 방법
style 속성에 TextStyle 을 넣으면 된다.Text("Woman", style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),),✅ TextStyle에서 자주 쓰는 속성 정리
속성 | 설명 | 예시 |
fontSize | 글자 크기 | fontSize: 16 |
fontWeight | 글자 굵기 | fontWeight: FontWeight.bold |
fontStyle | 이탤릭 | fontStyle: FontStyle.italic |
color | 글자 색상 | color: Colors.red |
letterSpacing | 글자 간 간격 | letterSpacing: 1.5 |
wordSpacing | 단어 간 간격 | wordSpacing: 2.0 |
height | 줄 간격 (line height) | height: 1.5 |
backgroundColor | 배경색 | backgroundColor: Colors.yellow |
decoration | 밑줄, 취소선 등 | decoration: TextDecoration.underline |
decorationColor | 밑줄 색상 등 | decorationColor: Colors.green |
decorationStyle | 밑줄 스타일 | decorationStyle: TextDecorationStyle.dashed |
fontFamily | 글꼴 지정 | fontFamily: 'NanumGothic' |
✅ 기본값
속성 | 기본값 |
fontSize | 14.0 |
fontWeight | FontWeight.normal |
color | 테마에 따라 자동 지정됨 (기본은 검정) |
fontStyle | 보통체 (normal) |
decoration | 없음 ( TextDecoration.none) |
Share article