본문 바로가기

분류 전체보기95

[Flutter] Button 종류 변경 참고 https://docs.flutter.dev/release/breaking-changes/buttons New Buttons and Button Themes The basic material button classes have been replaced. docs.flutter.dev 기존 플러터에서는 FlatButton,Outline Button,RaisedButton 3가지의 버튼을 사용했다. 각 버튼은 플러터 버전에 따라서 사용을 못하는데, 개별 스타일테마 적용에서 공용스타일테마 적용을 위해서라고 한다. 아무튼 변경된 버튼별 사용 예를 첨부한다. Flatbutton ▶TextButton TextButton( style: TextButton.styleFrom( shape: StarBorder(),.. Study/Flutter 2023. 2. 2.
[Flutter] Sqlite를 구현하는 Drift 들어가기에 앞서.. 플러터에서 pubspec.yaml 파일에서 dependencies와 dev_dependencies 항목이 있는데 dependencies는 앱에 함께 패키징 되나, dev_dependencies 는 개발될 때만 사용되고 앱과 함께 패키징 되지 않으므로 개발할 때만 필요하고 앱을 실행할 때 필요 없는 플러그인을 입력한다. Drift 클래스를 이용해서 SQLite 데이터베이스를 구현할 수 있는 플러그인으로 다트언어로 데이터베이스 테이블과 쿼리를 구현하면 자동으로 쿼리를 생성해준다. 이러한 일련의 기능을 코드생성(Code Generation)이라고 부르며, 코드생성은 데이터베이스 관련 코드가 변경될 때마다 한번씩만 실행해주면 되기 때문에 앱과함께 패키징 될 필요가 없으므로 dev_depend.. Study/Flutter 2023. 1. 30.
[Flutter] Widget을 밀어서 삭제하는 Dismissible Dismissible 밀어서 삭제하기를 구현하고 싶은 위젯을 Dismissible로 감싸고 onDismissed key 매개변수를 입력해주면 된다. Dismissible( key : ObjectKey(schedule.id), // 유니크한 Key값 direction : DismissDirection.endToStart, //밀기방향 onDismissed : (DismissDirection direction) {} //밀기 실행시 실행 함수 child : Container() , //밀어서 삭제하기 구현하기 위젯 ) DissmissDirection vertical - 세로로의 움직임을 모두 허가. 위-아래, 아래-위 horizontal - 가로로의 움직임을 모두 허가. 좌-우, 우-좌 endToStart .. Study/Flutter 2023. 1. 27.
[Flutter] gradle 버전 이슈 image_gallery_saver를 pubspec.yaml 에 추가하는데 하기와 같은 에러가 발생했다. 잘 읽어보니 안드로이드 Gradle은 코틀린 플러그인 1.5.20 버전 이상만 지원한다는 내용이었다. 또 해당사항은 image_gallery_saver 에서만 발생한 것이라는것을 확인했고 android/build.gradle 에서 classpath 'com.android.tools.build:gradle:7.3.0' -> classpath 'com.android.tools.build:gradle:7.1.2' 변경해줘서 해결.. FAILURE: Build failed with an exception. * What went wrong: The Android Gradle plugin supports onl.. Study/Flutter 2023. 1. 25.
[Flutter] Scaffold 정리 참고 : https://api.flutter.dev/flutter/material/Scaffold-class.html 기본 설계 레이아웃 구조를 구현하기 위한 클래스로 기본적으로 뼈대를 짜준다고 생각하면 된다. 관련 세부사항 및 properties는 아래 참고 AppBar, which is a horizontal bar typically shown at the top of an app using the appBar property. BottomAppBar, which is a horizontal bar typically shown at the bottom of an app using the bottomNavigationBar property. FloatingActionButton, which is a c.. Study/Flutter 2023. 1. 19.
반응형