[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
웹뷰 앱 만드는 부분 진행중입니다. HomeScreen 클래스 안에 homeUrl을 선언하면, ..loadRequest(homeurl) 부분에 인스턴스 멤버는 생성자?(initializer)안에 can't be accessed 라고 오류가 뜨는데, chatgpt랑 계속 대답을 주고 받았는데 제가 이해를 못해서 그런건지 안 와닿아서요.. HomeScreen 위젯을 생성할 때, 위에서부터 코드가 실행되니까 homeUrl이 먼저 초기화되서 될 것 같은데 왜 오류가 나나요? ㅠㅠ
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
비디오 플레이어 만들기에서요 Setstate를 쓰지 않고요!!! 멈추고 시작하는 부분에서 시작중인가 그럼 멈춰라 멈추었나 그럼 시작해라. 이런 코드를 넣잖아요 그래서 아이콘이 바뀌지는 않지만!! 누르면 멈추고 실행이 동작은 되는데 왜 Setstate를 넣지 않으면 아이콘이 바뀌지않는건 당연하다 생각하는데. 멈추고 실행하는 동작도 안되야 하지 않나 싶어서요 이런 동작을 안할 거 같은데 말이죠…,,
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
flutter pub run build_runner build 터미널에서 실행 터미널창 내용 PS E:\_flutter\section24_calendar> flutter pub run build_runner build Deprecated. Use `dart run` instead. Building package executable... (6.4s) Built build_runner:build_runner. [INFO] Generating build script completed, took 352ms [INFO] Precompiling build script... completed, took 7.4s [INFO] Building new asset graph completed, took 994ms [INFO] Checking for unexpected pre-existing outputs. completed, took 1ms [INFO] Generating SDK summary completed, took 4.2s [WARNING] drift_dev on lib/database/drift_database.dart: Could not resolve Dart library package:section24_calendar/database/drift_database.dart This builder requires Dart inputs without syntax errors. However, package:section24_calendar/database/drift_database.dart (or an existing part) contains the following errors. drift_database.dart:24:1: A function body must be provided. Try fixing the errors and re-running the build. [WARNING] drift_dev on lib/database/drift_database.dart: Could not resolve Dart library package:section24_calendar/database/drift_database.dart This builder requires Dart inputs without syntax errors. However, package:section24_calendar/database/drift_database.dart (or an existing part) contains the following errors. drift_database.dart:24:1: A function body must be provided. Try fixing the errors and re-running the build. [INFO] Running build completed, took 14.4s [INFO] Caching finalized dependency graph completed, took 75ms [INFO] Succeeded after 14.5s with 68 outputs (158 actions) PS E:\_flutter\section24_calendar> [INFO] Succeeded after 14.5s with 68 outputs (158 actions) 라고 68개 생긴다고 나오는데 마우스 우클릭 해도 파일은 안생김 검색해보니 flutter pub add --dev drift_dev flutter pub run build_runner clean flutter pub run build_runner build --delete-conflicting-outputs 각각 해봐도 안생기네요 flutter pub add --dev drift_dev 해봄 PS E:\_flutter\section24_calendar> flutter pub add --dev drift_dev "drift_dev" is already in "dev_dependencies". Will try to update the constraint. Resolving dependencies... _fe_analyzer_shared 64.0.0 (67.0.0 available) analyzer 6.2.0 (6.4.1 available) ffi 2.1.0 (2.1.2 available) flutter_lints 2.0.3 (3.0.1 available) intl 0.18.1 (0.19.0 available) js 0.6.7 (0.7.0 available) lints 2.1.1 (3.0.0 available) matcher 0.12.16 (0.12.16+1 available) material_color_utilities 0.5.0 (0.8.0 available) meta 1.10.0 (1.12.0 available) ! path 1.9.0 (overridden) test_api 0.6.1 (0.7.0 available) web 0.3.0 (0.4.2 available) web_socket_channel 2.4.0 (2.4.3 available) Got dependencies! 13 packages have newer versions incompatible with dependency constraints. Try `flutter pub outdated` for more information. PS E:\_flutter\section24_calendar> flutter pub run build_runner clean 해봄 PS E:\_flutter\section24_calendar> flutter pub run build_runner clean Deprecated. Use `dart run` instead. Building package executable... (6.3s) Built build_runner:build_runner. [WARNING] Deleting cache and generated source files. This shouldn't be necessary for most applications, unless you have made intentional edits to generated files (i.e. for testing). Consider filing a bug at https://github.com /dart-lang/build/issues/new if you are using this to work around an apparent (and reproducible) bug. [WARNING] No asset graph found. Skipping cleanup of generated files in source directories. [INFO] Cleaning up source outputs completed, took 1ms [INFO] Cleaning up cache directory completed, took 37ms PS E:\_flutter\section24_calendar> flutter pub run build_runner build --delete-conflicting-outputs 해봄 PS E:\_flutter\section24_calendar> flutter pub run build_runner build --delete-conflicting-outputs Deprecated. Use `dart run` instead. [INFO] Generating build script completed, took 335ms [INFO] Reading cached asset graph completed, took 100ms [INFO] Checking for updates since last build completed, took 911ms [INFO] Running build completed, took 17ms [INFO] Caching finalized dependency graph completed, took 78ms [INFO] Succeeded after 102ms with 0 outputs (0 actions) PS E:\_flutter\section24_calendar> 어찌 해야 조을까요
안녕하세요. 디렉토리 구조를 afterlogin과 beforelogin구조로 나누어서 로그인을 분기치고 있고 auth.ts에서 서버로 부터 전달받은 토근값을 넣고 미들웨어에서 세션을 유무를 확인하여 login페이지로 리다이렉트 시키고 있습니다. afterlogin과 beforelogin으로 디렉토리가 어떤방식으로 나뉘는지 로직이 궁금합니다. 관련된 훅이 있는것인지?? 2. 실제 상용화된 서비스라고하면 로그인이 풀리는것을 방지하기 위해 BE로 토근값을 요청할텐데, 관련 로직은 어떤방식으로 구현하는게 좋은방법인지 요청드립니다.
[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
https://riverpod.dev/ko/docs/migration/from_state_notifier riverpod 2 공식문서에 보면 Notifier/ AsyncNotifer 가 새롭게 도입되면서 StateNotifier는 더이상 사용되지 않는다고 나오는데 새로운 방식 강의 업데이트 안 해주시나요...?
안녕하세요. 강의 잘 보고 있습니다. remote data source impl 관련해서 질문이 있습니다. @prod @Singleton(as: CommunityRemoteDataSource) class CommunityRemoteDataSourceApiImpl implements CommunityRemoteDataSource { final _dio = Session().dio; @override Future<CommunityResponseDTO> fetchCommunities() async { Response<dynamic> response = await _dio.get('get/community/path'); final responseDto = CommunityResponseDTO.fromJson(response.data); return responseDto; } } CommunityRemoteDataSource 의 구현체 CommunityRemoteDataSourceApiImpl 를 만들어서 사용중입니다. ApiImpl 은 실제 서버와 통신중 이며, http 라이브러리 Dio를 사용하고 있습니다. 여기서 테스트를 위해 DioMock 객체를 만들어서 사용하고자 합니다. 원래 CommunityRemoteDataSourceApiImpl 에 final _dio = Session().dio; 로 싱글턴으로 dio를 내부에 객체를 생성하고 있는데 이거를 주입받는 식으로 변경하여 테스트 시만 CommunityRemoteDataSourceApiImpl(DioMock()) 을 넣는 것인지, 아니면 CommunityRemoteDataSourceApiMockImpl 를 새로 또 만드는지 궁금합니다. 만약 CommunityRemoteDataSourceApiImpl(DioMock()) 로 주입을 받는 식이라면 Response<dynamic> response = await _dio.get('get/community/path'); final responseDto = CommunityResponseDTO.fromJson(response.data); 해당 코드들이 Dio() 일 때, DioMock() 일 때 달라야 할 것 같은데 어떻게 처리하는 것이 맞는지 궁금합니다. 감사합니다.
글에 두서가 없어도 양해 바랍니다 이 수업 수강 이전에 코딩 문제를 풀 때 파이썬으로 재귀함수를 사용했던 적이 있습니다. 그때 알게 된것이 파이썬의 재귀함수에는 기본적으로 깊이의 제한이 있다는 것입니다. sys.recursionlimit()으로 확인해보니 재귀호출을 1000이상 못하도록 값이 제한되어 있고 이 값을 늘려서 사용하는것은 별로 추천되는 방법이 아닌걸로 알고 있습니다. C언어 사용할때에는 속도면에서 제한도 없고 파이썬보다 속도도 월등하다보니 재귀를 자주 사용했었는데 파이썬에서 재귀함수로 풀어야 하는 경우가 있을까요?
안녕하세요 제로초님. 인터넷창에 직접 주소를 입력하거나 새로고침 시 뒤에 배경화면이 사라지는 것에 대하여 질문있습니다. 먼저 <Link href='/i/flow/signup' className={styles.signup}> 를 클릭 시에는 인터셉터 라우팅이 트리거 되어 src/app/(beforeLogin)/layout.tsx 에 있는 children으로 인해 배경화면에 main컴포넌트가 보여지며 인터셉터된 @modal 은 modal부분에 보여집니다. 그런데 직접 주소창에 /i/flow/signup' 를 입력하여 접근하거나 새로고침하면 배경화면에 main컴포넌트가 사라지게 되는데 이것의 이유는 직접 접근할 때 인터셉에 걸리지 않게되고, childrend에는 i/flow에 있는 폴더들이 보여지며 defalut.tsx가 배경화면으로 보여지기 때문인가요?