[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
제가 생각한 벡엔드는 메인서버 데이터베이스에 모든 자료를 저장해 놓고 유저가 요청하는 경우에 필요한 자료를 전송하는 것이라고 생각했는데 sql 강의를 보니 사용자 앱에 자료가 저장되는 것 같아 헷갈리네요. getApplicationDocumansDirectory()라고 하는것을 볼때 사용자의 앱 내에 데이터를 저장하는 것 같은데 벡엔드 서버 구성은 따로 어떻게 되는건지 알고싶습니다
[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
안녕하세요! 중급 강의 따라가던 중에 궁금한 게 있어 질문드려요. Product_Card.dart 파일을 수정하실때, ProductCard 클래스에 RestaurantProductModel의 멤버들을 다 변수로 지정하셨잖아요? 그런데 그냥 RestaurantProductModel을 변수로 넣고 그냥 모델을 받아버리면 안되나요? class ProductCard extends StatelessWidget { final ProductModel model; const ProductCard({ required this.model, super.key, }); 이렇게 하고 디테일 스크린에서 ProductCard를 그냥 넘겨주는 식으로 해봤는데, 일단 동작하는 건 같더라구요. 그런데 이렇게 하지 않으신 데에는 무슨 다른 이유가 있으신건지 궁금합니다! 혹시 제 마음대로 했다가 나중에 문제가 생기진 않을까 걱정이 되어서... 답변기다리겠습니다. 감사합니다! ^^
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
일단 정확하게 오류보다는 앱이 강제 종료 되어 버리는 현상이 발생 합니다. 시뮬레이터는 ios 14Pro max로 실행하고 있습니다. 유일하게 아래와 같은 메시지가 떨어지는 것 말고는 오류 log가 나오는 부분은 없어 질문 드립니다. Failed to send request: {"jsonrpc":"2.0","id":"43","method":"getMemoryUsage","params":{"isolateId":"isolates/2034536295462095"}} 무슨 문제일까요... 이 외에는 아무런 단서가 없어 자체 해결을 못하고 있네요.
[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
토큰 만료 이후 GoRouter & Authentication 따라할 경우 401 에러를 저도 만났어요. 유사 질문들과 답변이 있어, 저도 경험기 공유합니다. 증상 GoRouter 적용 후 재실행시 Splash 화면에서 무한 로딩 http://127.0.0.1:3000/user/me/ 호출에서 401 로그 확인 원인 refreshToken 이 있거나 accessToken이 있는 경우에 토큰이 만료된 상태이면 증상 발생 의심 해결 user_me_provider.dart 파일 > getMe() 에서 try catch & state 초기화 추가 재실행 Future<void> getMe() async { // ... 중략 try { final resp = await repository.getMe(); state = resp; } catch(e, stack) { print(e); print(stack); state = null; } } 저와 동일한 오류를 만나는 분에게 소소한 도움이 되길 바래요 :)
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
색상 상태관리 페이지에서 color를 선택하기 전 database에서 color를 가져오는 부분까지는 잘 작동이 되었는데 기본 값을 list의 인덱스0설정 과 selected 값 설정을 한 이후 부터 계속 'hasSize': is not true. 와 Null check operator used on a null value 에러가 계속 뜨며 스케쥴 세부 항복 보기가 작동을 안합니다. 수업 따라가며 그대로 클론 코딩 중이였는데 (달력 색깔 제외) 무엇이 문제인지 잘 모르겠습니다.
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
색상정보 DB에 넣기 과정 중 InvalidDataException 에러가 발생합니다. 내용은 id 가 누락되었다고 하는데요 (아래 코드 블럭에 오류 추가했습니다) category_color.dart 에도 id 는 integer().autoIncrement()(); 로 해두었습니다. 앱 삭제 후 다시 설치해도 동일하게 문제가 발생하는데... id 값을 강제로 입력을 해야할까요? 입력을 해야한다면 어떤 식으로 입력을 하면 되는걸까요?? [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: InvalidDataException: Sorry, CategoryColorsCompanion(id: Value.absent(), hexCode: Value(F44336)) cannot be used for that because: • id: This value was required, but isn't present #0 VerificationContext.throwIfInvalid (package:drift/src/runtime/data_verification.dart:74:5) #1 InsertStatement._validateIntegrity (package:drift/src/runtime/query_builder/statements/insert.dart:257:51) #2 InsertStatement.createContext (package:drift/src/runtime/query_builder/statements/insert.dart:125:5) #3 InsertStatement.insert (package:drift/src/runtime/query_builder/statements/insert.dart:70:17) #4 LocalDatabase.createCategoryColor (package:calendar_scheduler/database/drift_database.dart:36:28) #5 main (package:calendar_scheduler/main.dart:38:22) <asynchronous suspension>
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
플러터 강의 중 구글맵 사용하는 강의 중에서요 GoogleMap( myLocationEnabled: true, 사용시 현재 위치 마커가 나오지않는데 .. 이유를 알수있을까요..? google_maps_flutter: ^2.1.11 사용중입니다. 강의 그대로 따라하는데 다되는데 이 마커만 안나오네요
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
안녕하세요 선생님. 플러터 책 같이보면서 실제 아이폰(11 pro max)으로 실습하고 있습니다. 그런데, 실습 예제를 처음 실행할 때, 항상 다음과 같은 에러가 뜹니다. < 안드로이드 스튜디오 콘솔> Xcode build done. 13.3s Installing and launching... (lldb) 2023-03-12 22:04:14.984533+0900 Runner[22785:8080178] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)") Warning: Unable to create restoration in progress marker file Debug service listening on ws://127.0.0.1:52817/-hSFUdbN4AY=/ws Syncing files to device Leibniz의 iPhone... fopen failed for data file: errno = 2 (No such file or directory) Errors found! Invalidating cache... fopen failed for data file: errno = 2 (No such file or directory) Errors found! Invalidating cache... < 아이폰 화면 > 물론 처음 한번 허용을 해주고 나면 두번째 실행부터는 오류가 뜨지도 않고, 허용 여부를 물어보지도 않습니다. (invalidate caches 문제인 듯 하지만, 매번 수동으로 해줄 수도 없는 노릇이라) 하지만 설정을 통해 안 뜨게 하는 방법이 있을까요? 혹시 있다면 여쭙고 싶습니다.
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
NativeDatabase 클래스를 사용하는데 문제가 있었습니다. 무언가가 자동으로 import되지않고 빨간밑줄인상태가 지속되었습니다. 한참 해메다가 A drift database implementation based on dart:ffi 라는 글을 보고 dart:ffi를 import 하고 다시 자동완성을 실행하니 정상적으로 native.dart패키지가 import되었습니다. 평소에는 자동import기능이 잘 작동했었는데 왜이러는걸까요?( getApplicationDocumentsDirectory()또한 자동완성, 자동import가 되지않아 따로 path_provideer를 임포트해주었습니다.) 질문 하나만 더 드리겠습니다. localDatabase() : super (_openConnection()); 와 localDatabase({super._openConnection()}); 은 같은 로직일텐데 아래코드는 애러가 나네요 왜그런걸까요?
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
모두 작성하고 run을 눌렀는데 디버그 콘솔에 이렇게 떴습니다. 아래는 디버그 콘솔 아래 메시지입니다. Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 4s Exception: Gradle task assembleDebug failed with exit code 1 Exited (sigterm) 폰트를 눌렀을 때 이렇게 뜨는데 이게 문제일까요? 인터넷에 찾아보고 이것저것 해봤는데 도저히 원인을 못찾겠네요 ㅠ
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
아래와 같은 오류가 뜨고 실행이 되지 않습니다. 어떻게 해야할까요? 참고로 ^4.0.6 버전으로 따라해봤습니다. Launching lib\main.dart on sdk gphone64 x86 64 in debug mode... Running Gradle task 'assembleDebug'... Warning: The plugin webview_flutter_android requires Android SDK version 33. For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration . One or more plugins require a higher Android SDK version. Fix this issue by adding the following to C:\Users\haK\StudioProjects\Netflix_flutter\android\app\build.gradle: android { compileSdkVersion 33 ... } FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:checkDebugAarMetadata'. > A failure occurred while executing com.android.build .gradle.internal.tasks.CheckAarMetadataWorkAction > One or more issues found when checking AAR metadata values: Dependency 'androidx.webkit:webkit:1.6.0' requires 'compileSdkVersion' to be set to 33 or higher. Compilation target for module ':app' is 'android-32' * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 15s Exception: Gradle task assembleDebug failed with exit code 1