TextField 의 대한 설명, 입력 예시 등등 TextField를 꾸미기 위해 많이 사용되는 hint, helper 입니다.
이름만으로는 헷갈릴 수 있는 아래 그림을 보시면 이해가 되리라 생각됩니다.
각각 텍스트와 스타일을 줄 수 있습니다.
TextField 의 decoration 속성 내부에 아래와 같이 사용할 수 있습니다.
decoration: const InputDecoration(
hintText: '힌트 텍스트',
hintStyle: TextStyle(color: Colors.grey),
helperText: '헬퍼 텍스트',
helperStyle: TextStyle(color: Colors.red)
),
'Flutter' 카테고리의 다른 글
[Flutter] Play store appbundle 업로드 (0) | 2022.11.14 |
---|---|
[flutter] Android appbundle 빌드하기 (0) | 2022.11.14 |
[Flutter] Row Column Axis & Alignment (0) | 2022.09.13 |
[Flutter] Row, Column 컨텐츠 크기에 맞추기 (0) | 2022.08.31 |
[Flutter] Getx Dialog (0) | 2022.08.31 |