티스토리 뷰
Dart & Flutter/Error 해결 정리
TextFormField 에서 text 의 vertical alignment 가 안 맞는 문제
낭초비 2023. 9. 11. 15:56반응형
Text를 입력 받기 위해 TextFromField를 사용했는데,
filed 내부에 표시되는 text 의 vertical alignment가 자꾸 안맞았다.
textAlignVertical: TextAlignVertical.bottom,
를 입력해도 변화가 없었고,
decoration: const InputDecoration(
contentPadding: EdgeInsets.zero,
),
을 건드려봐도 계속 text가 아랫쪽, 혹은 설정한 box 보다 아랫쪽에 표시되었다.
이 문제를 발생시키는 원인은 text 를 입력할때 아랫쪽에 생기는 밑줄을 없애기 위해 입력한 코드 때문인것을 찾았는데, 이렇게 밑줄을 삭제하면 안되나 보다.
decoration: const InputDecoration(
border: InputBorder.none,
),
구글링을 통해 해결 방법을 찾아보니, 아래와 같이 설정하면 되는 것이었다.
https://stackoverflow.com/a/64588863
Flutter TextField - textAlignVertical not working
I'm using a Flutter TextField inside a custom widget, but somehow the textAlignVertical property is not working. Below is the code for the custom widget. Is there anybody who knows where this behav...
stackoverflow.com
반응형
'Dart & Flutter > Error 해결 정리' 카테고리의 다른 글
TextField가 keyboard 에 가려지는 문제 (0) | 2023.10.12 |
---|---|
WidgetBinding.instance.addPostFrameCallback 이 호출되지 않는다. (0) | 2023.09.14 |
Firebase crashlytics 를 적용해보려는데.... (0) | 2023.05.04 |
ndk version disagree (0) | 2023.03.16 |
Snackbar 가 쌓이는 문제 (0) | 2023.01.16 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 앱개발
- firebase
- Syncfusion
- UI
- 에러
- plugin
- hide
- IOS
- Bluetooth
- 이미지
- 앱
- SizedBox
- 디자인
- 한빛미디어
- Flutter
- 플러터
- error
- TextField
- 인사이트
- TextFormField
- 크롬
- 앱 프로그래밍
- 문제 해결
- BLE
- 다트
- UX
- addPostFrameCallback
- position
- Chrome
- DART
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함