[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
제대로 한것 같은데 에러가 뜨네요 ㅠㅠ 에러 점검 부탁드립니다~~ lib/database/drift_database.dart:34:7: Error: The non-abstract class 'LocalDatabase' is missing implementations for these members: - GeneratedDatabase.schemaVersion - QueryExecutorUser.schemaVersion Try to either - provide an implementation, - inherit an implementation from a superclass or mixin, - mark the class as abstract, or - provide a 'noSuchMethod' implementation. class LocalDatabase extends _$LocalDatabase{ ^^^^^^^^^^^^^ ../../AppData/Local/Pub/Cache/hosted/pub.dev/drift-2.10.0/lib/src/runtime/api/db_base.dart:27:11: Context: 'GeneratedDatabase.schemaVersion' is defined here. int get schemaVersion; ^^^^^^^^^^^^^ ../../AppData/Local/Pub/Cache/hosted/pub.dev/drift-2.10.0/lib/src/runtime/executor/executor.dart:66:11: Context: 'QueryExecutorUser.schemaVersion' is defined here. int get schemaVersion; ^^^^^^^^^^^^^ Target kernel_snapshot failed: Exception FAILURE: Build failed with an exception. * Where: Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1201 * What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'. > Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1 * 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 7s Exception: Gradle task assembleDebug failed with exit code 1
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
안드로이드 폰에서 BouncingSrollPhysics를 적용해서 iOS같은 효과를 내고 싶습니다. 그런데 bouncing을 적용해도 자식 위젯들이 화면을 넘어가지 않으면 바운싱 되지않으며 스크롤도 되지 않습니다. 자식 위젯이 1개일 때, 안드로이드에서도 iOS같은 효과를 어떻게 낼 수 있나요??
[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
섹션 9 상태관리 프로젝트에 적용하기 > 완성된 Pagination 로직 실행해보기 8분경에 요청이 중복으로 들어가는 부분을 고친다고 말씀하셨는데 저부분을 고치는 강의가 뒤에 있나요? 다른 프로젝트에 적용할때 같은 문제가 발생해서 언급을 하셨다면 어느부분인지 찾지를 못하겠네요.
[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
안녕하세요 강사님 또 저입니다ㅠㅠ 중급강의의 로그인과 인증로직을 조금씩 변형해 현재 진행중인 프로젝트에 적용하려하는데 회원가입 POST가 필요한데 이를 예를들면 강의기준으로 UserMeStateNotifier내부에 Future<UserModelBase> login가 있듯이, Future<UserModel> postUser(UserModel userModel)로 Provider파트에 선언하고 @POST() Future<UserModel> postUser(@Body() UserModel user); 이런형태로 한 UserModel내에 선언해도될지 감이 안잡혀서 여쭤봅니다.이런부분에서 막힌거보니 아직 완전 이해를 못한거같습니다ㅠㅠ
[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
class ProductPage extends StatelessWidget { const ProductPage({super.key}); @override Widget build(BuildContext context) { return PaginationListView<ProductModel>( provider: productProvider, itemBuilder: <ProductModel>(_, index, ProductModel model) => GestureDetector( onTap: () => context.goNamed( RestaurantDetailPage.routeName, pathParameters: { 'rid': model.restaurant.id, }, ), child: ProductCard.fromProductModel( model: model, ), ), ); } } 여기서 이상한 에러가 뜹니다. 먼저 'rid': model.restaurant.id 이 부분에서는 아래와 같은 에러가 뜹니다. The property 'restaurant' can't be unconditionally accessed because the receiver can be 'null'. Try making the access conditional (using '?.') or adding a null check to the target ('!').dart unchecked_use_of_nullable_value 그리고 두 번째로, ProductCard.fromProductModel(model: model) 에서는 이런 에러가 뜹니다. The argument type 'ProductModel' can't be assigned to the parameter type 'ProductModel'.dart argument_type_not_assignable 두 에러 모두 이해되지 않습니다. ProductModel 타입을 ProductModel 타입으로 Assign할 수 없다니요? 같은 타입인데 이런 에러가 뜹니다. 또한 첫 번째 에러의 경우에도, 분명히 nullable 타입이 존재하지 않는데 nullable 체크를 하라고 하고 있습니다. 당황스럽습니다. 한편, 강의는 이런 식으로 되어 있습니다. itemBuilder: <ProductModel>(_, index, model) 즉 model 의 타입을 따로 지정해주지 않았습니다. 이렇게 했을경우 model의 타입은 dynamic 이 되며, 자동 완성 기능은 수행할 수 없지만, 결론적으로 잘 작동은 합니다. 그런데 왜 저런 이상한 에러가 발생하는 지 모르겠습니다. 여기 이와 관련된 코드를 덧붙입니다. 그러나 대부분 강의와 동일합니다. @JsonSerializable() class ProductModel implements IModelWithId { @override final String id; /// 상품 이름 final String name; /// 상품 상세 정보 final String detail; /// 상품 이미지 URL @JsonKey(fromJson: DataUtils.pathToUrl) final String imgUrl; /// 상품 가격 final int price; /// 레스토랑 정보 final RestaurantModel restaurant; ProductModel({ required this.id, required this.name, required this.detail, required this.imgUrl, required this.price, required this.restaurant, }); factory ProductModel.fromJson(Map<String, dynamic> json) => _$ProductModelFromJson(json); } typedef PaginationWidgetBuilder<T extends IModelWithId> = Widget Function( BuildContext context, int index, T model, ); 문제가 발생하고 있는 스크린샷:
[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
Token 발급 과정에서 username:password 값을 base64 로 인코딩 후 authorization 헤더에 Basic $token 형태로 전송하는 것이 정석이라고 말씀해주셨습니다. 질문1. Basic $token 형태는 인증정보가 그대로 base64 형태로 인코딩해줍니다. 그러면 누군가가 이 패킷을 까보기만 하면 데이터를 알 수 있는 것이 아닌가요..? 이 부분이 이해가 잘 안되네요. 설명부탁드립니다.. 질문2. 추가로 챗gpt 에게 질문했을 때, 로그인할 때 content type 을 application/x-www-form-urlencoded 형태로 보내라고 하는데, 대부분은 json 형태로 전송하더라구요.. 설명부탁드립니다...
[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
안녕하세요. 영상통화 강의를 끝마치고, 실제 기기 2개(안드로이드, 아이폰)에 같은 코드를 설치해서 실행하면 서로 영상통화가 될 줄 알았는데, 각자 상대방 없음으로 뜨면서, 서로 같은 채널에 입장이 안 되었습니다. Agora SDK 설명서에는 채널이름만 같으면 될 것처럼 써 있었는데 제가 잘못 이해한 것인지... 선생님 설명대로 서버에서 각 기기마다 토큰을 부여 받아야 하므로 기기마다 같은 APP ID에 임시 토큰을 서로 달리 받아야 하는 것인지... 실기기 2개로 영상통화 성공하는 것까지 마무리하고 싶습니다. 선생님께서 힌트를 살짝 주시면 감사하겠습니다.
[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
강의 3번째 보면서 진행중인데 에러 해결이 안되서 문의올립니다. 강의는 섹션 5-5 레스토랑 상세요청 구현하기 입니다. The relevant error-causing widget was: FutureBuilder<Map<String, dynamic>> FutureBuilder:file:///D:/flutter_project/baemin/lib/restaurant/view/restaurant_detail_screen.dart:39:16 39번 라인은 아래 그림보시면 되겠습니다. - 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 코드팩토리 디스코드 https://bit.ly/3HzRzUM Flutter 강의를 구매하시면 코드팩토리 디스코드 서버 플러터 프리미엄 채널에 들어오실 수 있습니다! 디스코드 서버에 들어오시고 저에게 메세지로 강의를 구매하신 이메일을 보내주시면 프리미엄 채널에 등록해드려요! 프리미엄 채널에 들어오시면 모든 질의응답 최우선으로 답변해드립니다!