본문 바로가기

반응형

Flutter-플러터/플러터 공부

Flutter 가로로 꽉찬 버튼 만드는 방법 4 Ways to Create Full-Width Buttons in Flutter - Kindacode 4 Ways to Create Full-Width Buttons in Flutter - Kindacode This practical and straightforward article walks you through 4 different ways to create full-width buttons in Flutter. Using ElevatedButton + www.kindacode.com 4 Ways to Create Full-Width Buttons in Flutter 더보기 가로로 꽉찬 버튼을 만드는 4가지 방법 Using ElevatedButton + Container/SizedBox Wrap .. 더보기
Flutter : timeago 를 쓰는 방법 2 ways to convert DateTime to time ago in Flutter - Kindacode 2 ways to convert DateTime to time ago in Flutter - Kindacode This article shows you 2 approaches to convert DateTime to time ago format in Flutter (and Dart, too), for example, 5 minutes ago, 1 day ago, 2 days www.kindacode.com 코딩을 하면서 부족한 부분은 구글링을 한다. 하지만 Flutter는 한국에서 아직 활성화 되어 있지 않아서인지 deep한 내용이나 최신내용들은 영어문서로 찾아봐야 한다. 그래서 영어 공부도 좀.. 더보기
Flutter 예외 처리 Dart언어에서는 예외처리가 가능하다. Dart의 모든 예외는 확인 되지 않은 예외이다. Try Try 절은 try{} 구문 안에서 특정 에러가 발생했을 때 처리해주기 위한 방법이다. try의 다양한 사용방식은 1. try on : 예외클래스 타입을 지정해야 할 때 사용 2. try-catch (e): 객체가 필요할 때 사용 3. try on catch : 예외클래스 타입도 지정해야 하고 객체가 필요할 때 사용 void onInit() { try { Hive.registerAdapter(TodoAdapter()); }catch(e){ print(e); } getTodos(); super.onInit(); } 위에는 어플이 처음 실행 될 때 Hive에서 오류가 났을 때 에러 메세지를 보이라는 코드이다. 예.. 더보기
캘린더 쓰기전에 DateTime yyyymmdd로 만드는 작업 현재 하루지출을 만들면서 히트맵 캘린더 패키지를 사용하고 있다. 그래서 시간 관련 값을 사용해야 한다. 아래 코드를 참고하였다. 아니 그대로 사용했다. https://github.com/mitchkoko/HabitTrackerFlutter GitHub - mitchkoko/HabitTrackerFlutter Contribute to mitchkoko/HabitTrackerFlutter development by creating an account on GitHub. github.com 오늘 날짜를 yyyymmdd로 만들고 yyyymmdd를 DateTime 객체로 만들고 그것을 다시 yyyymmdd로 변환하는 코드이다. 이 번잡스러운 수고를 해야 하는 이유가 시간은 단순히 2023년 12월 18일 이렇게 .. 더보기
flutter heatmap package flutter_heatmap_calendar | Flutter Package (pub.dev) flutter_heatmap_calendar | Flutter Package Flutter heatmap calendar inspired by github contribution chart which includes traditional mode / calendar mode. pub.dev 하루지출에 들어가는 히트맵 캘린더 패키지 Map타입으로 데이터를 저장한다. 해당 날짜의 해당 색의 값이 들어오면 색의 농도가 변하게 하는 구조이다. 깃허브 챌린지에서 많이 사용한다! class MonthlySummary extends StatelessWidget { final Map? datasets; final String.. 더보기
안드로이드 스튜디오 업데이트 후 오류 :Unable to find bundled Java version Unable to find bundled Java version with flutter doctor, after updating Android studio Arctic Fox(2020.3.1) on M1 Apple Silicon - Stack Overflow 더보기
flutter radio 버튼 사용하기 라디오 버튼 사용법을 익혀보았다. 먼저 클래스 밖에서 열거형 enum을 선언 enum Colorchange {red,green} enum Colorchange2 {red2,green2} 그리고 컨테이너를 만들고 Row로 Radio와 텍스트를 자연스럽게 붙여준다. Radiotile 위젯도 있는데 이것은 가로로 한 줄을 다 차지해버려서 쓰기 더 번거로웠다. Container(width: 80, height: 40, child: Row(children: [Radio(value: Colorchange.red, groupValue: _Colorchange, onChanged: (Colorchange? value) { setState(() { _Colorchange = value; }); },), Text('빨강'.. 더보기
TextFormField 커서 관리 : FocusNode https://medium.flutterdevs.com/focusnode-in-flutter-4a8613d7e4f6 FocusNode in Flutter Introduction : medium.flutterdevs.com 로그인이나,정보입력창이 필요할 때 텍스트 폼필드 위젯은 필수적이다. 그 텍스트폼필드 위젯을 더 편하게 사용할 수 있게 해주는 기능이 FocusNode이다. 1. 어플을 켰을 때 로그인 아이디를 입력해야 하는 텍스트폼필드 위젯 내에 커서가 반응을 하면서 키보드가 올라온다. 2. 아이디를 입력하고 키보드에 done을 누르면 비밀번호를 입력하는 텍스트폼필드 위젯에 커서가 옮겨진다. 고객들로 하여금 편의성을 주는 중요한 기능이다. 앞으로 만들 어플에 꼭 넣어야 한다. 어플을 켰을 때 텍스트폼 .. 더보기

반응형