본문 바로가기

HintText2

Flutter 플러터에서 TextField의 텍스트에만 패딩을 적용하는 방법은 무엇인가요?, How do I only apply padding to the text in a TextField in Flutter? 질문 패딩이 없으면 다음과 같은 결과가 나옵니다: 다음과 같은 방법으로 패딩을 사용하면 Padding(padding: EdgeInsets.all(20.0), child: TextField()) 다음과 같은 결과가 나옵니다: 조금 어렵게 보일 수 있지만, 빨간 배지를 보면 무슨 말인지 알 수 있습니다. 패딩을 사용하여 텍스트만 이동하고 싶지만, 실제로는 전체 TextField에 패딩이 적용되어 밑줄도 패딩과 함께 이동합니다. 하지만 밑줄은 여전히 전체 뷰를 가로지르도록 하고 싶습니다. 즉, TextField 내부의 텍스트에만 패딩이 적용되도록 하고 싶습니다. 답변 콘텐츠에 패딩을 적용하려면 TextField의 contentPadding 속성을 적용할 수 있습니다. TextField의 decoration 속.. 2023. 8. 28.
Flutter 플러터에서 어떻게 둥근 텍스트 필드를 만들 수 있나요?, How can I make rounded TextField in flutter? 질문 Material Design for iOS doesn't look good, especially the TextField. So is there any way to create your own ? Or Is ther any way to add some styling to TextField so it will look rounded ? 답변 당신은 TextField의 decoration 매개 변수 내에서 둥근 모서리를 추가할 수 있습니다. TextField( decoration: InputDecoration( border: OutlineInputBorder( borderRadius: BorderRadius.circular(10.0), ), filled: true, hintStyle: TextStyle.. 2023. 6. 14.