[Flutter + Dart] 10

[Flutter] 사진 업로드시 필요한 비동기처리, Future.wait(), GCS 이미지 업로드, 동시성 프로그래밍, 병렬처리 등

문제 사진 업로드시 원본사진과 썸네일 사진을 GCS에 업로드하는데, 이 때 한 게시물에서 올리는 사진 갯수가 많아짐에 따라 사용자는 아무 것도 할 수 없게 된다. 그래서 우선 아래와 같은 처리를 했다. 1. 등록 후 화면을 게시물 작성 화면을 벗어나 게시물 목록에서 다른 작업을 하거나 게시물을 읽어도 다른 스레드에서 사진이 업로드 되도록 하였다. 2. 사용자가 등록하는 사진이 10장이라면, GCS에는 썸네일 10장, 원본 파일 10장으로 총 20장이 올라간다. 이때 썸네일은 용량 축소를 위해 사진 크기와 품질을 떨어트려준다. 3. 사진이 10장이라면 10장이 업로드가 동기적으로 실행된다. 하지만 10장의 업로드를 병렬처리 한다면 시간을 축소할 수 있다. Dart의 비동기 처리 Dart의 비동기 프로그래밍..

[Flutter + Dart] 2023.04.01

[Git] 다른 브랜치에 머지된 커밋 취소하기 revoke하는 방법

devel이라는 개발계 브랜치에서 A라는 브랜치에 작업을 하다 커밋, 푸시, devel에 머지시켰다. 이후 A 를 devel 브랜치에 merge시킨 것을 취소하고 싶으면 아래 순서대로 진행한다. 가끔 Revoke 시킬 일이 있는데, 순서를 헷갈리지 않기 위해서 기록해둔다. To revoke a branch merge into the "devel" branch on GitHub, you will need to use the command line to create a new branch that reverts the changes made by the merge commit. Here are the steps: Checkout the "devel" branch: git checkout devel Creat..

[Flutter + Dart] 2023.01.28

[Flutter] 오류 대잔치 플러터 error build: Command PhaseScriptExecution failed with a nonzero exit code

하나 해결하면 다른거 터지고 다른거 터지고! 깃에서 이전 개발자가 만들어 놓은 프로젝트를 실행하는 것만해도 시간이 오래 걸린다. error build: Command PhaseScriptExecution failed with a nonzero exit code 터미널에서 프로젝트 경로로 가서 아래 코드 실행 rm -rf pubspec.lock flutter pub cache clean flutter clean flutter pub get ios폴더에서 아래 명령어 작성 rm -rf Podfile.lock (존재할 경우) rm -rf Pods (존재할 경우) rm -rf ~/Library/Developer/Xcode/DerivedData/* pod deintegrate pod cache clean --al..

[Flutter + Dart] 2023.01.10

[Flutter] M1/M2 Silicon Mac Cocoapod관련 오류 해결법

M1/M2 Silicon Mac Cocoapod관련 오류 해결법 => I am trying to run pod install or pod update and it's failing with the error message: [!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/CocoaPods-version.yml Response: URL using bad/illegal format or missing URL 기본적으로 기존에 깔려있는 cocoapods을 지우고 다시 설치해야한다. 그 전에 1) 응용 프로그램에서 2) 터미널 아이콘 복제 3) 복제한 터미널 아이콘 우측 클릭하여 정보보기하여 -> 로제타로 실행 체크 4) 해당 터미널 열..

[Flutter + Dart] 2023.01.08

[Flutter] M2 BUILD FAILED (macOS 12.6 using ruby-build 20221225)

Cocoapod M2 관련 오류 때문에 아래 작업을 실행해야하는데, 권한이 없다고 나온다. gem uninstall cocoapods arch -x86_64 brew install cocoapods arch -x86_64 brew reinstall cocoapods 그래서 아래처럼 rbenv를 설치하려는데 어떤 버전으로 해도 오류가 나타난다. rbenv install 2.7.7 오류 내용은 아래와 같다. BUILD FAILED (macOS 12.6 using ruby-build 20221225) Inspect or clean up the working tree at /var/folders/9k/y7hfk9rx31x22q_jxrnjfjnh0000gn/T/ruby-build.20230108182310.122..

[Flutter + Dart] 2023.01.08

[Flutter] iOS 시뮬레이터 Run 중 발생 오류 - Error output from CocoaPods : [!] The version of CocoaPods used to generate the lockfile (1.11.3) is higher than the version of the current executable (1.11.2).

기존에 개발자가 간략하게 플러터 프로젝트를 생성하고 튜토리얼 화면을 만들어 놓았는데, 이를 확인하기 위해 내 노트북에서 플러터 프로젝트를 시뮬레이터로 돌리는 것부터 에러가 발생했다. Error output from CocoaPods: [!] The version of CocoaPods used to generate the lockfile (1.11.3) is higher than the version of the current executable (1.11.2). Incompatibility issues may arise. [!] Automatically assigning platform `iOS` with version `11.0` on target `Runner` because no platform ..

[Flutter + Dart] 2023.01.06

[Flutter] You don't have an extension for debugging 'Java Properties'. Should we find a 'Java Properties' extension in the Marketplace

시뮬레이터 실행시 아래와 같은 버그 메시지가 뜰 때가 있다. You don't have an extension for debugging 'Java Properties'. Should we find a 'Java Properties' extension in the Marketplace 이때 해결 방법 .dart 파일을 선택한 후 실행을 한다. 근데 새로산 M2 + 메모리 16 조합에서 시뮬레이터가 왜이렇게 느리게 돌아갈까?ㅎㅎㅎㅎ M1 pro Max를 살걸 그랬나 싶은 생각이 많이 드는 요즘이다.

[Flutter + Dart] 2023.01.06

[Flutter] Mac M2 환경 - VSC에서 iOS 시뮬레이터 실행 안됨 오류 - Failed to launch iOS Simulator: Error: Emulator didn't connect within 60 seconds

Flutter 프로젝트를 만들어 VSC에서 시뮬레이터를 돌려보았다. iOS를 선택했다. 아래와 같은 오류가 발생했다. Failed to launch iOS Simulator: Error: Emulator didn't connect within 60 seconds 해결 방법 1. 시뮬레이터를 먼저 켠다. 2. 다시 VSC로 돌아온다. Run Debug를 실행한다.

[Flutter + Dart] 2023.01.06

[Flutter] Mac 개발 환경 셋팅 : 오류 해결 Android toolchain - develop for Android devices / Android sdkmanager not found.

flutter doctor --android-licenses 을 입력하면 아래와 같은 에러가 나타난다. Android sdkmanager not found. Update to the latest Android SDK and ensure that the cmdline-tools are installed to resolve this. 1. 안드로이드 SDK Managner에 들어간다. 2. 좌측 Android SDK 를 누르고 우측 하단의[] Hide Obsolete Packages를 체크 해제한다. 그렇게 되면 3. 우측 탭에서 SDK tool 탭에서 Android SDK Command-line Tools(latest)와 Andorid SDK Tools(Obsolete)가 보인다. 4. OK를 눌러서 설치..

[Flutter + Dart] 2023.01.06