티스토리 뷰
반응형
다양한 스타일이 혼합된 텍스트를 쓰고 싶을 때 RichText 위젯을 사용해주면 됩니다.
예를들어 아래 예제처럼 중간 텍스트에만 볼드 처리를 하고 싶을 때 사용합니다.
RichText는 TextSpan 으로 구성된 트리로 이루어집니다.
문서의 예제처럼 Hello의 children으로 bold랑 world를 두기 싫으면
이렇게 할 수 도 있습니다. UI는 똑같이 구성됩니다.
RichText(
text: TextSpan(
children: [
TextSpan(text: 'Hello '),
TextSpan(text: 'bold', style: TextStyle(fontWeight: FontWeight.bold)),
TextSpan(text: ' world!'),
])
)
[ 추천 ]
다양한 Use Case를 보여주는 글!
반응형
'🤼♀️ > Flutter' 카테고리의 다른 글
[Flutter] 플러터 웹 이슈 기록 (4) | 2021.10.13 |
---|---|
[Flutter] 플러터 웹앱 배포 (Web App Deployment) (5) | 2021.10.12 |
[Flutter] describeEnum (0) | 2021.09.15 |
[Flutter] 플러터 웹 서포트 / 웹앱 만들기 (0) | 2021.09.15 |
[Flutter] 프로젝트 별로 플러터 버전을 다르게 해주는 방법 (2) | 2021.09.12 |
댓글
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- 장고 Custom Management Command
- Flutter 로딩
- 장고 URL querystring
- drf custom error
- 플러터 얼럿
- Watch App for iOS App vs Watch App
- METAL
- flutter 앱 출시
- Sketch 누끼
- DRF APIException
- Django Heroku Scheduler
- Flutter Clipboard
- ipad multitasking
- flutter deep link
- github actions
- SerializerMethodField
- flutter dynamic link
- Django Firebase Cloud Messaging
- PencilKit
- Dart Factory
- Django FCM
- flutter build mode
- Flutter Spacer
- 플러터 싱글톤
- ribs
- Flutter Text Gradient
- Flutter getter setter
- 구글 Geocoding API
- cocoapod
- Python Type Hint
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
글 보관함