본문 바로가기

Dev/Flutter63

Flutter - iOS 앱 업로드 for TestFlight Flutter 에서 iOS 앱 업로드를 하는 방법을 단계별로 설명합니다. 1. Xcode 를 동작한다. 2. 최상단 메뉴바에서 Product -> Archive 를 눌러준다 여기서 Archive 가 누를 수 없는 상태(비활성화)일 수도 있다. 그때는 Runner를 하는 대상이 에뮬레이터가 아니고 실제 디바이스를 대상으로 한지 체크해봐야 합니다. 참고 3. 빌드가 끝나면 업로드 작업을 할 수 있는 화면이 보인다. 그리고최신 빌드 버전이 상단에 보일테니 우측에 Distribute App 을 누른다. 4. 쭉쭉 진행한다. 2022. 1. 12.
Flutter - Json 데이터 사용하는 방법 Flutter 에서 Json 데이터를 파싱해서 사용하기 위해서는 파싱할 수 있도록 설정 작업을 해야한다. 1. pubspec.yaml 에 라이브러리를 추가한다. 라이브러리 추가 방버 : 링크 참조 dependencies: # Your other regular dependencies here json_annotation: dev_dependencies: # Your other dev_dependencies here build_runner: json_serializable: json_serializable 링크 2. Json 을 받을 수 있는 Object 클래스를 만든다. @JsonSerializable() class User { User(this.name, this.email); String name; S.. 2022. 1. 11.
Flutter - Calendar / SfCalendar / Syncfusion / 캘린더 Flutter 에도 많은 라이브러리들이 존재한다. 그리고 잘 만들어져 있고 커스텀하기 좋은 Calendar 라이브러리가 Syncfusion 에서 만든 Calendar 입니다. - Syncfusion Flutter Calendar 라이브러리 링크 ✔️ 데이터 리로딩 이슈 SfCalendar 를 사용할때, 데이터를 셋팅해주는 부분이 있다. 그런데 여기서 나는 API 에서 데이터를 다시 받아와서 캘린더에 뿌려줘야하는데 종종 데이터를 제대로 뿌려주지 못하는 이슈가 발생했는데, API 에서는 데이터를 잘 내려받지만 캘린더에 표시가 됐다가 안됐다가를 반복해서 이래저래 시도해보다가 검색해서 데이터를 다시 리로딩하는 방법을 찾고 수정했습니다. - 리로딩 이슈 해결 방법 링크 ❗ 처음 시도한 방식 1. 아래와 같이 UI.. 2022. 1. 7.
Flutter - Enum Java, Kotlin 에서와 같이 Flutter 에서도 Enum 이 당연히 사용 가능하다. 다만, Enum 만 사용해서는 커스텀이 불가능하다. 그래서 extention 을 해서 사용해야한다. 그래서 그런지 class 를 선언해서 static const 를 선언해서 사용하길 권장하는것 같다. 참고 : https://www.technicalfeeder.com/2021/08/dart-how-to-assign-values-to-enum/ 2022. 1. 4.
Flutter - Divider(구분선) Flutter 에서 구분선을 구현하는 방법 1. 기본적인 가로 구분선 구현 Divider(thickness: 1, height: 1, color: myColor) Divider.dart 생성자 const Divider({ Key? key, this.height, this.thickness, this.indent, this.endIndent, this.color, }) 2. 세로 구분선 VerticalDivider(thickness: 1, width: 1, color: color) VerticalDivider.dart 생성자 const VerticalDivider({ Key? key, this.width, this.thickness, this.indent, this.endIndent, this.color,.. 2021. 12. 29.
Flutter - TextButton 기본 레이아웃 스타일 없애는 방법 2가지 1. Style 로 없애는 방법 TextButton( onPressed: (){}, child: Text('버튼'), style: TextButton.styleFrom( minimumSize: Size.zero, padding: EdgeInsets.zero, tapTargetSize: MaterialTapTargetSize.shrinkWrap, ), ) https://stackoverflow.com/a/69382707/3897810 2. InkWell 로 감싸는 방법 InkWell( onTap: () { // Text 클릭시 반응하는 곳 }, child: const Padding( padding: EdgeInsets.all(5.0), child: Text('버튼'), ), ), 2021. 12. 16.