본문 바로가기

분류 전체보기980

Flutter 플러터에서 TextField 하단의 글자 수 카운터를 숨기는 방법은 무엇인가요?, How can I hide letter counter from bottom of TextField in Flutter 질문 Flutter에서 작은 문제를 마주하고 있습니다. 보시다시피, TextField의 maxLength를 1로 설정했지만, 텍스트 카운터의 하단 레이블을 숨길 수 없습니다. 답변 TextField 또는 TextFormField 위젯에서 maxLength 속성을 사용하면 카운터 값을 숨기려면 다음을 시도하십시오. TextField( decoration: InputDecoration( hintText: "Email", counterText: "", ), maxLength: 40, ), 여기서 나는 빈 값으로 InputDecoration 속성 내에 counterText 속성을 설정했습니다. 도움이 되기를 바랍니다. 2023. 5. 16.
Flutter 텍스트 필드의 높이와 너비를 변경하는 방법은 무엇인가요?, How to change TextField's height and width? 질문 TextField의 width와 height를 어떻게 사용자 정의할 수 있나요? 답변 너비를 조정하려면 다음과 같이 TextField를 SizedBox 위젯으로 래핑 할 수 있습니다: const SizedBox( width: 100.0, child: TextField(), ) TextField의 높이에 대해 정확히 무엇을 원하는지 모르겠지만, TextStyle 위젯을 살펴볼 수 있습니다. 이 위젯을 사용하면 fontSize 및/또는 height를 조작할 수 있습니다. const SizedBox( width: 100.0, child: TextField( style: TextStyle(fontSize: 40.0, height: 2.0, color: Colors.black), ), ) TextStyle의.. 2023. 5. 15.
Flutter 플러터에서 행의 요소 간 간격 설정하기, Set the space between Elements in Row Flutter 질문 코드: new Container( alignment: FractionalOffset.center, child: new Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ new FlatButton( child: new Text('Don\'t have an account?', style: new TextStyle(color: Color(0xFF2E3233))), ), new FlatButton( child: new Text('Register.', style: new TextStyle(color: Color(0xFF84A2AF), fontWeight: FontWeight.bold),), onPressed: moveToRegister, .. 2023. 5. 15.
Flutter 플러터: 일부 조건에 따라 목록 필터링하기, Flutter: filter list as per some condition 질문 나는 영화 목록을 가지고 있다. 애니메이션과 비애니메이션 영화를 모두 포함한다. 애니메이션인지 아닌지를 식별하기 위해 isAnimated라는 하나의 플래그가 있다. 나는 애니메이션 영화만 보여주고 싶다. 어떻게 할 수 있을까? 답변 toList()는 결과를 구체화하는 데 필요합니다. _AnimatedMovies = AllMovies.where((i) => i.isAnimated).toList(); 2023. 5. 15.