본문 바로가기

FLUTTER203

Flutter에서 GitHub에서 패키지를 추가하는 방법은 무엇인가요?, How to add a package from GitHub in Flutter? 질문 나는 패키지의 최신 소스 코드를 사용해야하며 최신 소스가 아직 게시되지 않았습니다. pubspec.yaml에 무엇을 작성해야하며 Github에서 패키지를 받을 수 있습니까? 아래 코드는 작동하지 않습니다. 패키지를 다운로드하지 않으며 소스 코드로 가져올 수 없습니다. dependencies: flutter: sdk: flutter carousel_pro: git: url: https://github.com/jlouage/flutter-carousel-pro.git 답변 pubspec.yaml 예시 특정 브랜치의 의존성: dependencies: flutter: sdk: flutter carousel_pro: git: url: https://github.com/jlouage/flutter-carous.. 2023. 5. 29.
Flutter에서 다음 TextField로 포커스를 이동하는 방법은 무엇인가요?, How to shift focus to the next TextField in Flutter? 질문 저는 플러터를 처음 사용합니다. Form, TextFormField 위젯을 사용하여 여러 텍스트 입력란이있는 양식을 작성하고 있습니다. 나타나는 키보드에서는 "다음" (다음 필드로 포커스를 이동해야 함) 필드 작업이 아니라 "완료" 작업 (키보드를 숨기는 작업)이 표시되지 않습니다. 공식 문서에서 힌트를 찾아보았지만 직접적으로 할 수있는 것은 없었습니다. 나는 FocusNode (cookbook, api doc)에 도달했습니다. 이것은 앱에서 버튼이나 기타 작업을 사용하여 포커스를 이동시키는 메커니즘을 제공하지만 키보드에서 작동하도록하고 싶습니다. 답변 Screenshot: Just use: textInputAction: TextInputAction.next: To move the cursor to.. 2023. 5. 28.
Flutter 플러터에서 드롭다운 리스트를 구현하는 방법은 무엇인가요?, How to implement drop down list in flutter? 질문 나는 Flutter에서 드롭다운 목록으로 구현하고자하는 위치 목록이 있습니다. 나는 이 언어에 대해 매우 새롭습니다. 내가 한 것은 다음과 같습니다. new DropdownButton( value: _selectedLocation, onChanged: (String newValue) { setState(() { _selectedLocation = newValue; }); }, items: _locations.map((String location) { return new DropdownMenuItem( child: new Text(location), ); }).toList(), 이것은 내 항목 목록입니다: List _locations = ['A', 'B', 'C', 'D']; 그리고 나는 다음 오류를.. 2023. 5. 28.
Flutter 커스텀 카드 모양 플러터 SDK, Custom Card Shape Flutter SDK 질문 I have developed an app with GridView on Flutter. GridView items are Card and the default card shape is Rectangle with a radius of 4. I know there is shape property for Card Widget and it takes ShapeBorder class but I am unable to find how to use ShapeBorder class and customize my cards in GridView. How do I go about this? 답변 이렇게 사용할 수 있습니다. Card( shape: RoundedRectangleBorder( borderRadius: .. 2023. 5. 28.