묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
PaginationProvider의 로직 중 이해안가는 부분이 있습니다.
RestaurantPagination-5 2:25경에 나오는 부분입니다.if (fetchMore) { final pState = state as CursorPagination<T>; state = CursorPaginationFetchingMore( meta: pState.meta, data: pState.data, ); paginationParams = paginationParams.copyWith( after: pState.data.last.id, ); } // 데이터를 처음부터 가져오는 상황. else { // 만약에 데이터가 있는 상황이라면 // 기존 데이터를 보존한 채로 Fetch를 진행한다. // 여기!! if (state is CursorPagination && !forceRefetch) { final pState = state as CursorPagination<T>; state = CursorPaginationRefetching<T>( meta: pState.meta, data: pState.data, ); } else { state = CursorPaginationLoading(); } }해당로직에서 "// 여기!!"로 표시한 부분에서if(state is CursorPagination && !forceRefetch)조건문이 이해가지 않습니다.fetchMore는 아닌데 새로고침(forceRefetch)도 아니다. 그런데 데이터를 이미 가지고 있고 새로운 데이터를 요청한다?이게 어떤 경우를 의미하고 작성된 케이스일까요?
-
해결됨[Python 초보] Flutter로 만드는 ChatGPT 음성번역앱
pip install 오류가 해결이 안되네요...
구글링을 통해 pip upgrade, scipy==1.12.0 버전설치vscode vswhere.exe 설치등을 해 보았는데 해결이 안되어 문의드립니다. (desktop_venv) D:\voicechat\DESKTOP>pip install scipyWARNING: Ignoring invalid distribution - (d:\voicechat\desktop\desktop_venv\lib\site-packages)WARNING: Ignoring invalid distribution -ip (d:\voicechat\desktop\desktop_venv\lib\site-packages)Collecting scipy Using cached scipy-1.13.1.tar.gz (57.2 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [21 lines of output] + meson setup C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822 C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822\.mesonpy-_ppx3dkm -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822\.mesonpy-_ppx3dkm\meson-python-native-file.ini The Meson build system Version: 1.4.1 Source dir: C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822 Build dir: C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822\.mesonpy-_ppx3dkm Build type: native build Project name: scipy Project version: 1.13.1 WARNING: Failed to activate VS environment: Could not parse vswhere.exe output ..\meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']] The following exception(s) were encountered: Running icl "" gave "[WinError 2] 지정된 파일을 찾을 수 없습니다" Running cl /? gave "[WinError 2] 지정된 파일을 찾을 수 없습니다" Running cc --version gave "[WinError 2] 지정된 파일을 찾을 수 없습니다" Running gcc --version gave "[WinError 2] 지정된 파일을 찾을 수 없습니다" Running clang --version gave "[WinError 2] 지정된 파일을 찾을 수 없습니다" Running clang-cl /? gave "[WinError 2] 지정된 파일을 찾을 수 없습니다" Running pgcc --version gave "[WinError 2] 지정된 파일을 찾을 수 없습니다" A full log can be found at C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822\.mesonpy-_ppx3dkm\meson-logs\meson-log.txt [end of output] note: This error originates from a subprocess, and is likely not a problem with pip.error: metadata-generation-failed× Encountered error while generating package metadata.╰─> See above for output.note: This is an issue with the package mentioned above, not pip.hint: See above for details.
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
플러터 ui guide 안보이는 현상
섹션5에서는 코드팩토리님도 ui guide가 안보였는데(위젯 계층간의 연결선) 섹션7부터는 보이네요. 저는 ui guide가 안보이는데 어떻게 해결해야할까요?
-
해결됨Flutter 앱 개발 기초
5회차 강의 자료에 5-3 세션이 없습니다
강의 수고 많으셨습니다.
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
fold 예시 오류
void main() { List<String> words = [ '안녕하세요 ', '저는 ', '코드팩토리입니다.', ]; final sentence = words.fold<String>('', (prev + next) => prev + next); print(sentence);} 이렇게 똑같이 작성을 했는데, 오류가 뜨는 이유가 뭘까요?The argument type 'String Function(String)' can't be assigned to the parameter type 'String Function(String, String)'. Expected to find ')'.Undefined name 'next'.
-
해결됨Flutter 앱 개발 실전
강의 기간 연장에 대하여
안녕하세요.작년에 강의를 결제하여 잘 들었고 해당 내용에도 실무에도 많은 부분에 적용하여 큰 도움이 되고 있습니다 감사합니다.다만 계속 처리해야할 일이 많아져 제가 테스트 부분을 아직 듣질 못해서.. 혹시 수강기간을 연장해주실수 있으실까 싶어서 문의드립니다.감사합니다.
-
해결됨Flutter 앱 개발 기초
android studio 설치시 오류
intel® haxm installation failed.Downloading Components 도중 위와 같은 오류가 뜨네요..구글링으로 해결법따라해보면될까요?
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
클래스 문의
미세먼지 강의에서 클래스를 인스턴스로 만들지 않고 ,변수를 직접사용하는 부분이 이해가 안됩니다.클래스를 인스터스화 하지않고 , 직접변수를 사용이 가능한가요? (static을 사용하면 변수를 직접사용 가능한것은 알고 있습니다. )class StatusModel { final int level; final String label; final Color primaryColor; final Color darkColor; final Color lightColor; final Color detailFontColor; final String imagePath; final String comment; final double minFineDust; final double minUltraFineDust; final double minO3; final double minNO2; final double minCO; final double minSO2; StatusModel( {required this.level, required this.label, required this.primaryColor, required this.darkColor, required this.lightColor, required this.detailFontColor, required this.imagePath, required this.comment, required this.minFineDust, required this.minUltraFineDust, required this.minO3, required this.minNO2, required this.minCO, required this.minSO2}); }
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
TabBarView와 BottomNavigation 및 table_calendar 같이 사용할 시 화면에 안나오는 문제
캘린더 예시에서 캘린더 라이브러리와 배너랑 스케쥴카드를 한 화면에 넣잖아요. 바텀네비게이션바와 충돌이 나는 건지.. Column(children:)으로 감싸면 화면 에러가 나고 SafeArea/Container(child: )로 감싸면 잘 나옵니다. 탭바뷰List<Widget> renderChildren() { return [ RuleScreen(), TechniquesScreen(), TotalCalendarScreen(),<-- 이부분 CalculateScreen(), ]; }TotalCalendarScreen() 잘 나오는 경우 class TotalCalendarScreen extends StatefulWidget { @override State<TotalCalendarScreen> createState() => _TotalCalendarScreenState(); } class _TotalCalendarScreenState extends State<TotalCalendarScreen> { DateTime selectedDate = DateTime.utc( DateTime.now().year, DateTime.now().month, DateTime.now().day, ); void onDaySelected(DateTime selectedDate, DateTime focusedDate) { setState(() { this.selectedDate = selectedDate; }); } @override Widget build(BuildContext context) { return Scaffold( body: SafeArea( child: MainCalendar( onDaySelected: onDaySelected, selectedDate: selectedDate, ), ), ); } BOTTOM OVERFLOWED BY infinity PIXELS return Scaffold( body: SafeArea( child: Column( children: [ <-- 리스트로 감싸면 에러납니다. MainCalendar( onDaySelected: onDaySelected, selectedDate: selectedDate, ), SizedBox(height: 8), TodayBanner(selectedDate: selectedDate), SizedBox(height: 8), ScheduleCard(startTime: 12, endTime: 14, content: 'content'), ], ), ), ); 어떻게 해결하면 좋을까요?
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
Reorderable ListView
이거 자주 안쓰신다고 하셧는데저는 생각나는게 그 todolist프로젝트할때 카드리스트 만들때 이걸로 만들면 카드 순서 바꿀때 좋겟구나 햇는데 카드 순서 바꾸는 스크롤뷰는 보통 멀로 만드시나요
-
미해결[2025 리뉴얼]플러터플로우로 코딩 없이 한달 안에 앱 만들기
파이어베이스 아이디 질문
플러터플로우 관련 질파이어베이스 프로젝트 아이디 설정에서 generate config files을 눌러도 파이어베이스 프로젝트 아이디가 자동생성이 안되요.
-
해결됨GetX 기반 Flutter 앱 만들기
material theme
이거 material theme가져오는거 달라진거같은데 혹시 지금은 어떻게 할 수 있을까요?
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
Widget build(BuildContext context) 의미
안녕하세요!StatefulWidget 라이프사이클 강의 중에 Widget build(BuildContext context)를 설명해주실 때 build함수에서Build Context와 context를 파라미터로 받을 수 있고 context를 변수로 사용할 수 있다고 하셨는데요, 이 부분에 대해 잘 이해가 가지 않아 문의드립니다.build는 함수이고 (Build Context context)는 build함수의 파라미터가 되는 것일까요?(Build Context context)의 각각 역할은 어떤 것일까요? context에 대해 변수라는 설명도 있었는데 같이 설명부탁드려요.감사합니다.
-
미해결[2025 리뉴얼]플러터플로우로 코딩 없이 한달 안에 앱 만들기
Postgre SQL 연결
안녕하세요. 강의 잘 듣고 있습니다!! ㅎㅎAndroidStudio를 살짝 맛 봤던 사람으로써 코드 없이 앱을 만들 수 있다는게 너무 편하고 좋네요.. FlutterFlow에서는 Firebase를 주로 사용하는데제가 맡은 업무에서는 Postgre 연결이 필요할 것 같아요 혹시 이 연결 방법은 고급 강의에서 들을 수 있나요?제가 postgre sql자체를 아예 몰라서...문서 찾기나 방법 찾기가 더욱 힘든 것 같아질문 남겨봅니다. 또한 자체 개발 백앤드 api를 연결 할 경우 방법이 쉬운 편인지도 여쭤보고싶어요 😃
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
MaterialStateProperty 없어지고 WidgetStateProperty 로 변경
MaterialStateProperty 없어지고 WidgetStateProperty 로 변경되었습니다
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
구글 맵스 ios 오류
Launching lib/main.dart on iPhone 15 in debug mode...Running pod install...CocoaPods' output:↳ [!] Invalid Podfile file: /Users/yurim/Desktop/flutter/chool_check_app/Flutter/Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first. # from /Users/yurim/Desktop/flutter/chool_check_app/ios/Podfile:9 # ------------------------------------------- # unless File.exist?(generated_xcode_build_settings_path) > raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" # end # ------------------------------------------- /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/gems/cocoapods-core-1.15.2/lib/cocoapods-core/podfile.rb:335:in `rescue in block in from_ruby' /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/gems/cocoapods-core-1.15.2/lib/cocoapods-core/podfile.rb:329:in `block in from_ruby' /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/gems/cocoapods-core-1.15.2/lib/cocoapods-core/podfile.rb:50:in `instance_eval' /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/gems/cocoapods-core-1.15.2/lib/cocoapods-core/podfile.rb:50:in `initialize' /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/gems/cocoapods-core-1.15.2/lib/cocoapods-core/podfile.rb:327:in `new' /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/gems/cocoapods-core-1.15.2/lib/cocoapods-core/podfile.rb:327:in `from_ruby' /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/gems/cocoapods-core-1.15.2/lib/cocoapods-core/podfile.rb:293:in `from_file' /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/gems/cocoapods-1.15.2/lib/cocoapods/config.rb:206:in `podfile' /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:160:in `verify_podfile_exists!' /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/gems/cocoapods-1.15.2/lib/cocoapods/command/install.rb:46:in `run' /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in `run' /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in `run' /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/gems/cocoapods-1.15.2/bin/pod:55:in `<top (required)>' /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/bin/pod:25:in `load' /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/bin/pod:25:in `<main>'Error running pod installError launching application on iPhone 15.이렇게 에러가나서 지도가 나오지 않습니다 ㅜㅜ 도와주세요
-
해결됨[Python 초보] Flutter로 만드는 ChatGPT 음성번역앱
음성 인식 후 마이크 색깔이 변하지 않아요.
안녕하세요.강의를 보면서 쭈욱 진행하고 있는데, 에뮬레이터에서 음성인식을 테스트하면 음성인식이 완료되었음에도 마이크 색깔이 검정색으로 변하지 않습니다. 강의 내용대로 코드를 쳤는데 확인 부탁드립니다. (혹시 소스코드가 깃헙에는 없나요?..)import 'package:dash_chat_2/dash_chat_2.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; import 'dart:convert'; import 'package:speech_to_text/speech_to_text.dart'; import 'package:speech_to_text/speech_recognition_result.dart'; class BasicScreen extends StatefulWidget { @override _BasicState createState() => _BasicState(); } class _BasicState extends State<BasicScreen> { bool isListening = false; SpeechToText _speechToText = SpeechToText(); bool _speechEnabled = false; String _lastWords = ''; @override void initState() { super.initState(); _initSpeech(); } ChatUser user1 = ChatUser( id: '1', firstName: 'me', lastName: 'me', ); ChatUser user2 = ChatUser( id: '2', firstName: 'chatGPT', lastName: 'openAI', profileImage: "assets/img/gpt_icon.png" ); late List<ChatMessage> messages = <ChatMessage>[ ChatMessage( text: '반갑습니다. 어서오세요. 무엇을 도와드릴까요?', user: user2, createdAt: DateTime.now(), ), ]; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('Basic example'), ), body: DashChat( currentUser: user1, onSend: (ChatMessage m) { setState(() { messages.insert(0, m); }); Future<String> data = sendMessageToServer(m.text); data.then((value){ setState(() { messages.insert(0, ChatMessage( text: value, user: user2, createdAt: DateTime.now(), )); }); }); }, messages: messages, inputOptions: InputOptions( leading: [ IconButton( icon: Icon(Icons.mic, color: isListening? Colors.red: Colors.black), onPressed: (){ setState(() { isListening = !isListening; if (isListening == true){ print('음성인식 시작'); _startListening(); }else{ print('음성인식 끝'); _stopListening(); } }); }, ) ] ) , ), ); } Future<String> sendMessageToServer(String message) async{ var headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer sk-proj-b2yCBjZ7jwkR7nmWl4NLT3BlbkFJmm0iaZMBGPJHHy3b3I4J', }; var request = http.Request('POST', Uri.parse('https://api.openai.com/v1/chat/completions')); request.body = json.encode({ "model": "gpt-3.5-turbo", "messages": [ { "role": "user", "content": message, } ] }); request.headers.addAll(headers); http.StreamedResponse response = await request.send(); if (response.statusCode == 200) { String responseString = await response.stream.bytesToString(); Map<String, dynamic> jsonResponse = json.decode(responseString); String result = jsonResponse['choices'] != null? jsonResponse['choices'][0]['message']['content']: "No result found"; print(responseString); return result; } else { print(response.reasonPhrase); return "ERROR"; } } /// This has to happen only once per app void _initSpeech() async { print("음성인식 기능을 시작합니다."); _speechEnabled = await _speechToText.initialize(); // setState(() {}); } /// Each time to start a speech recognition session void _startListening() async { print("음성인식을 시작합니다."); await _speechToText.listen(onResult: _onSpeechResult); // setState(() {}); } /// Manually stop the active speech recognition session /// Note that there are also timeouts that each platform enforces /// and the SpeechToText plugin supports setting timeouts on the /// listen method. void _stopListening() async { print("음성인식을 종료합니다."); await _speechToText.stop(); // setState(() {}); } /// This is the callback that the SpeechToText plugin calls when /// the platform returns recognized words. void _onSpeechResult(SpeechRecognitionResult result) { _lastWords = ""; if(result.finalResult){ _lastWords = result.recognizedWords; print("최종 인식된 문장: $_lastWords"); setState(() { messages.insert(0, ChatMessage( text: _lastWords, user: user1, createdAt: DateTime.now(), )); }); Future<String> data = sendMessageToServer(_lastWords); data.then((value){ setState(() { messages.insert(0, ChatMessage( text: value, user: user2, createdAt: DateTime.now(), )); }); }); } } }
-
해결됨[플러터플로우] 실전! 앱 출시를 위한 끝장 노하우!
Firebase로 관계형 데이터베이스 구현 가능성
안녕하세요 개발 초보입니다.파이어베이스로 관계형 데이터베이스를 구축하기는 힘들거라는 조언을 얻었는데구체적으로 뭐가 힘든건지는 잘 모르겠어서 질문드립니다 일단 플러터플로우에서 기본적으로 파이어베이스를 제공하고있고 자료도 많아 이쪽으로 하고싶은데 조언대로라면 수파베이스를 써야할 것 같아서요. 예를 들어 a유저와 b유저 사이에 각자가 생각하는 친밀도값이 있고 b유저와 c유저도 마찬가지로 친밀도값이 있습니다. 결국 a유저와 b유저는 친하고, b유저는 c유저와 친하다는 것을 알아내어 a와 c를 연결하기 위한 것이 목적인데 이러한 알고리즘을 파이어베이스로 구축가능할까요?
-
미해결[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
retrofit multipartfile 리스트 보내기
@POST('/boards') @Headers({'Authorization': 'true'}) @MultiPart() Future<HttpResponse> createBoard({ @Part() required BoardRequestModel boardCreateModel, @Part() List<MultipartFile>? files, });이렇게 multipartfile 리스트로 이미지를 보내려고 하는데생성된 g.dart 파일을 보면 이렇게 에러가 발생합니다현재 getx 에서 Multipartfile을 hide 해주고 사용했습니다혹시 retrofit을 이용할때 multipartfile 리스트를 보내는 방법이 따로 있을까요?
-
미해결[플러터 상태관리] Bloc 마스터 코스 기초부터 응용까지!
잘 모르겠어요
따라쳐볼때 전체적인 구조나 흐름을 잘 모르겠어서 따라치지않고 그냥 봐도 잘 모르겠네요.. 여러번 보면 괜찮을까요?? bloc사용할거라 후속작 책 리뷰앱도 결제했는데 getX부터 잘 모르겠어요.. getX 유튜브강의 따로 내놓으신거있던데 그걸봐야할까요?시간낭비일까요.. 큰일이네요..(setState까진 이해했습니다..)