본문 바로가기

Study/Flutter26

[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.
[Flutter] Widget정리 #2 WebView, flutter 권한 WebView 정리 https://pub.dev/packages/webview_flutter webview_flutter | Flutter Package A Flutter plugin that provides a WebView widget on Android and iOS. pub.dev 4.0 버전이 새로 올라왔는데 기존 3.0과는 사용법이 조금 달라졌다. 달라진점 더보기 Instantiating WebViewController In version 3.0 and below, WebViewController could only be retrieved in a callback after the WebView was added to the widget tree. Now, WebViewController mu.. Study/Flutter 2023. 1. 18.
[Flutter] StatefulWidget vs StatelessWidget StatelessWidget 특징 위젯 내부에서 값 변경돼도 위젯 자체적으로 렌더링 불가 생명주기 1. StatelessWidget이 빌드되면 생성자가 실행. 2. build() 함수 실행 3. build()함수에 반환한 위젯이 렌더링 StatefulWidget 특징 위젯 내부 값이 변경되었을때 위젯에서 다시 렌더링 생명주기 위젯 클래스와 State 클래스 2개로 구성 A. 상태변경이 없는 생명주기 상태변경이 없는 생명주기는 위젯이 화면에 나타나며 생성되고 화면에서 사리지며 삭제되는 과정을 의미. StatefulWidget 생성자가 실행 createState() 함수 실행. createState()는 StatefulWidget을 상속받았을 때 반드시 오버라이드 해야하는 함수로 StatefulWidget과.. Study/Flutter 2023. 1. 17.
반응형