productRepository.selectList 호출시 이미지 리스트를 List객체로 반환되는 방법을 알고 싶습니다. 아래의 코드를 보면 이미지리스트는 한개(pi.ord=0)만 가져오는데요. imageList의 모든값이 List객체에 담겨 Page<Object[]>에 포함되는 방법을 알고 싶습니다. Page<Object[]> result = productRepository.selectList(pageable); @Query("select p, pi from Product p left join p.imageList pi where pi.ord = 0 and p.delFlag = false") Page<Object[]> selectList(Pageable pageable);
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
웹뷰 앱 만드는 부분 진행중입니다. HomeScreen 클래스 안에 homeUrl을 선언하면, ..loadRequest(homeurl) 부분에 인스턴스 멤버는 생성자?(initializer)안에 can't be accessed 라고 오류가 뜨는데, chatgpt랑 계속 대답을 주고 받았는데 제가 이해를 못해서 그런건지 안 와닿아서요.. HomeScreen 위젯을 생성할 때, 위에서부터 코드가 실행되니까 homeUrl이 먼저 초기화되서 될 것 같은데 왜 오류가 나나요? ㅠㅠ
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
비디오 플레이어 만들기에서요 Setstate를 쓰지 않고요!!! 멈추고 시작하는 부분에서 시작중인가 그럼 멈춰라 멈추었나 그럼 시작해라. 이런 코드를 넣잖아요 그래서 아이콘이 바뀌지는 않지만!! 누르면 멈추고 실행이 동작은 되는데 왜 Setstate를 넣지 않으면 아이콘이 바뀌지않는건 당연하다 생각하는데. 멈추고 실행하는 동작도 안되야 하지 않나 싶어서요 이런 동작을 안할 거 같은데 말이죠…,,
mocking과 spy함수가 조금 헷갈립니다. 아래와 같이 정리하면 될까요? - spy 함수 : 빈 함수인데, vitest에서 이 함수를 감지하고 있고 함수가 call 되었는지, 인자는 무엇이었는지 검증하는 가짜 함수. - mocking : 종속성이 있는 라이브러리를 복사해두고, 그 중 사용해야 할 함수나 기능을 spy 함수로 대체하여 call 했는지 검사할 수 있는 프로세스. 그러면 mocking 자체는 spy 함수 없이 사용하는 것은 의미가 없다고 보면 될까요?
[코드팩토리] [초급] 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() 일 때 달라야 할 것 같은데 어떻게 처리하는 것이 맞는지 궁금합니다. 감사합니다.