전체 글 889

[플러터/Flutter] Dart 3.0, Flutter 3.10.0 업그레이드 시 Error: The argument type 'void Function(TapDownDetails)' can't be assigned to the parameter type 'void Function(TapDragDownDetails)?'. 에러 날 때 해결책

이 해결책은 flutter_html 을 사용할 경우에 해당됩니다. 얼마 전 구글 I/O 2023 에서 Dart, Flutter 의 새로운 버전을 발표 했고 저는 신나게 버전을 올렸습니다. 그러나..... 이게 웬걸 갑자기 에러가 본 적 없는 에러가 발생했씁니다. ../../.pub-cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:186:20: Error: The argument type 'void Function(TapDownDetails)' can't be assigned to the parameter type 'void Function(TapDragDownDetails)..

Flutter(플러터) 2023.05.25

[안드로이드/Android] 안드로이드에서 엑셀 Excel(.xlsx) 파일 읽기, Read Excel(.xlsx) file in android

1. Apache POI 라이브러리 추가하기 dependencies { ... implementation 'org.apache.poi:poi:3.9' implementation 'org.apache.poi:poi-ooxml:3.9' ... } 버전은 3.9로 해주시면 됩니다. 최신버전인 5.2.2로 해봤는데 아래와 같은 에러가 발생했고, 저는 별다른 해결책을 찾지 못했습니다. 그래서 3.9로 진행했씁니다. 1. app/src/main 에 assets 디렉토리만들고 읽으려는 .xlsx 파일 추가하기 2. 엑셀읽어오는 함수 만들기 fun readExcel(fileName: String) { val assetManager = assets val inputStream = assetManager.open(file..

안드로이드 2023.05.24

[플러터/Flutter] Don't use 'BuildContext's across async gaps.Try rewriting the code to not reference the 'BuildContext' 경고 해결 방법

await 다음에 Navigator.of(context).pop();처럼 BuildContext 를 사용하는 코드를 작성할 경우 Don't use 'BuildContext's across async gaps. Try rewriting the code to not reference the 'BuildContext' 요런 경고 메시지가 뜨는데요. 해결하는 방법은 간단합니다. context 를 포함하는 코드 바로 위에 if(!mounted) return;

Flutter(플러터) 2023.05.17

[플러터/Flutter] android build.gradle GradleException unable to resolve class GradleException 에러 해결하기

플러터 개발 시 android 의 build.gradle(:app) 파일을 열면 def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") } 이런 코드가 있는데 throw new GradleException에 빨간 줄이 하나 생기면서 unable to resolve class GradleException 이런 에러가 있다고 알려줍니다. 크게 문제되지는 않지만 에러를 없애고 싶다면 아래 방법을 사용하면 됩..

Flutter(플러터) 2023.05.16

[플러터/Flutter] create and show Flutter Custom Dialog

Show CustomDialog showDialog( context: context, builder: (BuildContext context) { return Widget(); } ); Create CustomDialog 원하는 UI 의 위젯을 만들면 됩니다. 만약 다이얼로그에서 이전 화면으로 데이터를 전달하고 싶다면 아래처럼 호출하시고 void showCustomDialog() async { final result = await showDialog( context: context, builder: (BuildContext context) { return Widget(); } ); setState(() { aaa = result; }); } 다이얼로그에서 Navigator.of(context).pop(d..

Flutter(플러터) 2023.04.25