묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨Flutter로 SNS 앱 만들기
섹션5AuthStatus상태에 따른화면이동_2push And RemoveUntil사용해서 화면이동
섹션5AuthStatus상태에 따른화면이동_2push And RemoveUntil사용해서 화면이동 (route) => route.isFirst,여기에서 route속성에서 4개가 있는데 나머지 3개는 어떤 역활을 하는겁니까isActiveisCurrentpopDisposition검색을 해도 무슨말인지 잘 이해가 안가서요.
-
미해결[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
플레이스토어에 앱을 올렸을 시 스플래시 화면에서 안넘어가는 이슈
안녕하세요! 안드로이드 스튜디오에서 apk를 릴리즈용으로 만들어서 실행시킬때는 정상 동작을 확인했는데요, playstore에 올렸을때는 정상 동작을 안하는 버그가 있습니다. 어디서부터 뭐가 잘못됬는지를 알수가 없어서 질문 올립니다 ㅜㅜ 현재 playstore에 앱 번들을 업로드 한 상태입니다.여기서 다운로드해서 실행 시 이런 스플레시 화면에서 안넘어가는데 도무지 어디서부터 체크해야할지 모르겠어서 답답한 상황입니다.. 혹시 이런 경우를 보셨다면 말씀주시면 정말 도움이 될 것 같습니다. 감사합니다 이유는 알수없지만 redirectLogic 혹은 ref.listen<UserModelBase?>(userMeProvider, (previous, next) { if (previous != next) { notifyListeners(); } });요게 잘 안되고있는것 같은데.. 어렵네요.. 초기 페이지를 login으로 하면 잘됩니다 ㅜ
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
키노트 자료는 제공 안해주나요?
개인 노트에 내용을 정리하는데 큰 도움이 될것 같은데,키노트는 제공이 안되는건지요?스크린샷이 안되기 때문에 그림을 정리할 수가 없네요.
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
GestureDetector onTap이 올바르게 동작하지 않습니다.
안녕하세요.좋은 강의 잘 듣고 있습니다. VideoPlayer을 포함한 위젯을 VideoPlayerWidget으로 Stateful 위젯으로 구현했습니다.그리고 자식 위젯으로 아래 코드와 같이 GestureDetector > ApstectRatio > Stack 으로 구성하였습니다.Stack의 자식 위젯으로는 VideoPlayer, _PlayButtons, _Bottom 위젯을 가지고 있습니다. 이 때, VideoPlayer가 포함되어 있으면 GestureDetector의 onTap 메서드가 호출되지 않으며, VideoPlayer를 제외하는 경우 onTap 메서드가 호출되고 있습니다. 관련해서 자식의 터치 이벤트도 감지하기 위해 GestureDetector에 behavior 프로퍼티로 HitTestBehavior.opaque 값을 할당했지만, 그래도 VideoPlayer가 존재하는 경우 올바르게 동작하지 않고 있습니다. 혹시 어떤 부분이 문제인지 알 수 있을까요...?감사합니다. 아래 코드는 VideoPlayerWidget의 build 메서드입니다.@override Widget build(BuildContext context) { return GestureDetector( behavior: HitTestBehavior.opaque, onTap: (){ print("onTap"); }, child: !isInitalized ? const CircularProgressIndicator() : AspectRatio( aspectRatio: videoPlayerController.value.aspectRatio, child: Stack( children: [ VideoPlayer(videoPlayerController), _PlayButtons( onLeft: onLeft, onPlay: onPlay, onRight: onRight, isPlaying: videoPlayerController.value.isPlaying, ), _Bottom( posMinutes: videoPlayerController.value.position.inMinutes, posSeconds: videoPlayerController.value.position.inSeconds, durationMinuets: videoPlayerController.value.duration.inMinutes, durationSeconds: videoPlayerController.value.duration.inSeconds, onSliderChanged: onSliderChanged, ), // _PickPicture(onPress: widget.onPickPicture,) ])), ); }
-
해결됨Flutter 응용 - 공공 API를 활용한 앱 만들기 (MVVM 패턴)
provider를 사용하시는 이유가 있을까요?
안녕하세요! 강의 잘 듣고 있습니다.상태관리 패턴 중에 provider를 개선해서 만든 riverpod이 아닌, provider를 채택하신 이유가 있을까요??상태관리 라이브러리를 riverpod으로 입문했는데, 강사님께서 provider를 사용하시는 포인트가 궁금합니다!
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
Intel HAXM installation failed! 를 만났습니다
안녕하세요.HAXM 설치 도움 부탁드립니다.증상 : emulator 설치편에서 device manager 메뉴에서 Flutter Inflearn 은 잘설치되고, start 를 하니까 HAXM 설치하라고 하여 진행하니 다음 에러 발생했습니다.BIOS에서VT-x는 support로 되어 있는것 확인했습니다. 어떻게 해결해야되는지 도와 주세요.Intel HAXM is required to run this AVD. HAXM is not installed. Install Intel HAXM for better emulation performance. 경고가 뜨서 SDK tool에서 Intel x86 Emulator Accelerator... 체크해서 apply 하니까 다음 에러 메세지 만났습니다.Running Intel® HAXM installerIntel HAXM installation failed!For more details, please check the installation log: C:\Users\beamw\AppData\Local\Temp\haxm_install-20240909_2145.logIntel® HAXM installation failed. To install Intel® HAXM follow the instructions found at: https://github.com/intel/haxm/wiki/Installation-Instructions-on-WindowsDone
-
미해결[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
postman test 항목이 없습니다.
강의를 진행하던 도중에 tests 항목에 환경세팅을 해줘야하는 부분이 있는데 현재 포스트 맨에서 tests 항목이 보이지 않습니다. 추가를 해줘야되는 부분인가요? 아니면 업데이트 되서 없어진건지.. 여쭈어보려고 합니다.
-
해결됨Flutter 앱 개발 실전
late final 속성
part 'theme_color.dart'; part 'theme_deco.dart'; part 'theme_typo.dart'; abstract class ThemeCore{ late final Brightness theme; late final ThemeColor color; late final ThemeDeco deco; late final ThemeTypo typo; }코드를 복사해서 클래스 이름만 바꿔서 붙여 넣었습니다import 'package:custom_house/theme/foundation/theme_core.dart'; import 'package:custom_house/theme/res/base_typo.dart'; import 'package:custom_house/theme/res/palette.dart'; import 'package:flutter/material.dart'; class LightTheme implements ThemeCore { @override Brightness brightness = Brightness.light; @override ThemeColor color = ThemeColor( surface: Palette.grey100, background: Palette.black.withOpacity(0.55), text: Palette.black, subtext: Palette.grey700, toastContainer: Palette.black.withOpacity(0.85), onToastContainer: Palette.grey100, hint: Palette.grey300, hintContainer: Palette.grey150, onHintContainer: Palette.grey500, inactive: Palette.grey400, inactiveContainer: Palette.grey250, onInactiveContainer: Palette.white, primary: Palette.green, onPrimary: Palette.white, secondary: Palette.red, onSecondary: Palette.white, tertiary: Palette.yellow, onTertiary: Palette.white, ); @override late ThemeTypo typo = ThemeTypo( typo: const NotoSans(), fontColor: color.text, ); @override ThemeDeco deco = ThemeDeco( shadow: [ BoxShadow( color: Palette.black.withOpacity(0.1), blurRadius: 35, ), ], ); }이렇구요 기존 아래와 같은 코드에서 @override Brightness brightness = Brightness.light;다음과 같이 바꿔봤는데 @override late final Brightness brightness = Brightness.light;에러가 나는데 이해가 되지 않습니다. 어차피 나중에 초기화를 해도 되니까 late를 붙인거고 , 밝다라는 속성은 바꾸지 않을 거니까 final 키워드까지 썼는데 에러가 나는 이유를 모르겠습니다. implements로 구현하니까 이런 현상이 생기네요..
-
미해결Flutter로 SNS 앱 만들기
섹션2 firestore에 회원정보저장에서
섹션2 firestore에 회원정보저장에서 9:14UploadTask uploadTask = ref.putData(profileImage); downloadURL = await snapshot.ref.getDownloadURL();저장이 완료전에 실행하는것을 에러방지위해 await를 쓰신다고 하셨는데. 타입까지 바뀌나요.?UploadTask uploadTask = await ref.putData(profileImage);
-
미해결[플러터플로우] 실전! 앱 출시를 위한 끝장 노하우!
FF + supabase 사용 시 소셜로그인
안녕하세요 선생님! 앞에 다른 질문이 있었는데, 내용이 달라서 따로 질문 드립니다앞의 강의는 FF + firebase 에서 구글로그인뒤의 강의는 FF + firebase 에서 kakao 로그인이 있는데 FF + supabase 사용 시 다른 소셜로그인은 어떤식으로 하시는지 궁금합니다.감사합니다.
-
미해결[플러터플로우] 실전! 앱 출시를 위한 끝장 노하우!
플러터플로우 / supabase 사용 시 push 는 어떻게 하시는지 궁금합니다
안녕하세요 선생님! 강의 잘 보고 있습니다.궁금한게 있는데 혹시 FF + supabase 사용 시 push notification 은 어떻게 사용하고 계신지 궁금합니다!감사합니다!
-
해결됨Flutter 앱 개발 기초
firebase 로그인 및 회원가입 async-await 필요여부
한가지 궁금한 것이 있어 질문 남깁니다.다른게 아니라 로그인이나 회원가입을 만들 때 onPressed를 async-await으로 만든다고 알고 있는데강의에서는 async-await 없이 로그인과 회원가입을 만들더라고요. 그 이유가 궁금합니다.
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
onStartTimeValidate 함수에서 값이 null로 넘어 올 수 있나요?
String? onStartTimeValidate(String? val) { if (val == null) return '값을 입력 해주세요.'; if (int.tryParse(val) == null) return '값을 숫자로 입력해주세요.'; final int time = int.parse(val); if (time > 24 || time < 0) return '0~24의 값을 입력해주세요.'; return null; }강의처럼 코드를 위와 같이 작성했을때텍스트 필드에 값을 입력하지 않고 저장하면 값이 빈 문자열로 넘어와서 '값을 입력해주세요' 가 아니라 '숫자를 입력해주세요' 라는 에러가 발생합니다.텍스트 필드의 값이 미입력시 null 이 아니라 빈문자열('')로 넘어오는것 같아서 아래처럼 코드를 수정했는데 맞는걸까요?if (val == null || val == '') return '값을 입력 해주세요.';
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
typedef를 사용한 특별한 이유가 있을까요?
BottomSheet 디자인 마무리하기에서 categoryColor를 변경할때 typedef를 사용하신 이유가 뭔가요?_Categories( selectedColor: selectedColor, onTap: (String color) { setState(() { selectedColor = color; }); }, ),위 처럼 넘기고 _Category 클래스에서 일반함수로 받고 아래처럼 실행해줘도 오류 없이 되는 것 같은데onTap: () { onTap(e); },typedef로 별도로 정의해서 받는 특별한 이유가 있는지 궁금합니다!
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
Appbar 의 my_location 버튼을 눌러도 현재위치로 이동하질 않습니다.
강의 정말 잘 듣고있습니다! 오늘도 출근 프로젝트에서 앱바 액션 버튼의현재 위치로 시점 이동 버튼 기능이 동작하지 않습니다. 중간에 기능 확인할때 잘 작동하는것을 확인했는데강의 다 듣고 나서 다시 확인하니 작동을 하지 않습니다. Geolocator.getCurrentPosition() 여기서 데이터를 못받아와서 그런것 같은데 뭐 때문에 갑자기 못 받아오는건지 알수가 없습니다... import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:geolocator/geolocator.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; class HomeScreen extends StatefulWidget { const HomeScreen({super.key}); @override State<HomeScreen> createState() => _HomeScreenState(); } class _HomeScreenState extends State<HomeScreen> { final CameraPosition initialPosition = CameraPosition( target: LatLng( 37.5214, 126.9246, ), zoom: 15); late final GoogleMapController controller; bool choolCheckDone = false; bool canChoolCheck = false; final double okDistance = 100; final testPosition = LatLng(37.5214, 126.9246); @override initState() { super.initState(); Geolocator.getPositionStream().listen((event) { final start = testPosition; final end = LatLng(event.latitude, event.longitude); final distance = Geolocator.distanceBetween( start.latitude, start.longitude, end.latitude, end.longitude, ); setState(() { if (distance > okDistance) { canChoolCheck = false; } else { canChoolCheck = true; } }); }); } checkPermission() async { final isLocationEnabled = await Geolocator.isLocationServiceEnabled(); if (!isLocationEnabled) { throw Exception('위치 기능을 활성화 해주세요.'); } LocationPermission checkedPermission = await Geolocator.checkPermission(); if (checkedPermission == LocationPermission.denied) { checkedPermission = await Geolocator.requestPermission(); } if (checkedPermission != LocationPermission.always && checkedPermission != LocationPermission.whileInUse) { throw Exception('위치 권한을 허용 해주세요.'); } } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text( '오늘도 출근', style: TextStyle( color: Colors.blue, fontWeight: FontWeight.w700, ), ), actions: [ IconButton( color: Colors.blue, onPressed: myLocationPressed, icon: Icon(Icons.my_location), ), ], ), body: FutureBuilder( future: checkPermission(), builder: (BuildContext context, AsyncSnapshot snapshot) { if (snapshot.hasError) { return Center( child: Text(snapshot.error.toString()), ); } return Column( children: [ Expanded( flex: 2, child: _GoogleMaps( testPosition: testPosition, okDistance: okDistance, canChoolCheck: canChoolCheck, initialPosition: initialPosition, onMapCreated: googleMapController, ), ), Expanded( flex: 1, child: _Bottom( choolCheckDone: choolCheckDone, canChoolCheck: canChoolCheck, onChoolCheckPressed: onChoolCheckPressed, ), ) ], ); }, ), ); } googleMapController(GoogleMapController controller) { // state에 선언한 controller에 방금 선언한 controller 넣음 this.controller = controller; } onChoolCheckPressed() async { final result = await showDialog( context: context, builder: (BuildContext context) { return CupertinoAlertDialog( title: Text('출근하기'), content: Text('출근을 하시겠습니까?'), actions: [ TextButton( onPressed: () { Navigator.of(context).pop(false); }, child: Text('취소'), style: TextButton.styleFrom(foregroundColor: Colors.red), ), TextButton( onPressed: () { Navigator.of(context).pop(true); }, child: Text('출근하기'), style: TextButton.styleFrom(foregroundColor: Colors.blue), ) ], ); }, ); if (result) { setState(() { choolCheckDone = true; }); } } myLocationPressed() async { print('before'); final location = await Geolocator.getCurrentPosition(); print('after'); controller.animateCamera( CameraUpdate.newLatLng( // 이 위치로 구글맵 카메라를 애니메이션과 함께 움직여라! LatLng( location.latitude, location.longitude, ), ), ); } } class _GoogleMaps extends StatelessWidget { final LatLng testPosition; final double okDistance; final bool canChoolCheck; final CameraPosition initialPosition; final MapCreatedCallback onMapCreated; const _GoogleMaps({ super.key, required this.testPosition, required this.okDistance, required this.canChoolCheck, required this.initialPosition, required this.onMapCreated, }); @override Widget build(BuildContext context) { return GoogleMap( initialCameraPosition: initialPosition, mapType: MapType.normal, myLocationEnabled: true, myLocationButtonEnabled: false, zoomControlsEnabled: false, onMapCreated: onMapCreated, markers: { Marker( markerId: MarkerId('123'), position: testPosition, ), }, circles: { Circle( circleId: CircleId('inDistance'), center: testPosition, radius: okDistance, fillColor: canChoolCheck ? Colors.blue.withOpacity(0.5) : Colors.red.withOpacity(0.5), strokeColor: canChoolCheck ? Colors.blue : Colors.red, strokeWidth: 1, ) }, ); } } class _Bottom extends StatelessWidget { final bool choolCheckDone; final bool canChoolCheck; final VoidCallback onChoolCheckPressed; const _Bottom({ super.key, required this.choolCheckDone, required this.canChoolCheck, required this.onChoolCheckPressed, }); @override Widget build(BuildContext context) { return Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Icon( choolCheckDone ? Icons.check : Icons.timelapse_outlined, color: choolCheckDone ? Colors.green : Colors.blue, ), SizedBox( height: 16, ), if (!choolCheckDone && canChoolCheck) OutlinedButton( onPressed: onChoolCheckPressed, child: Text('출근하기'), style: OutlinedButton.styleFrom( foregroundColor: Colors.blue, ), ), ], ); } }
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
윈도우 에뮬레이터창 오류
에뮬레이터터 세팅하기 강의 잘 따라하다가 에뮬레이터 실행하면 아래 그림처럼 최소화된 상태에서 클릭도 안되고 더이상 진행이 안됩니다. 강의에서처럼 구글디바이스 기본화면이 별도창으로 나와야하는데 말이죠 ㅜ 진도는 나가야하기 때문에 다시 '체크헤제'취소하고 아래처럼 사용하고 있습니다. 코드팩토리 디스코드에 질문하면 더욱 빠르게 질문을 받아 볼 수 있습니다![코드팩토리 디스코드]https://bit.ly/3HzRzUM - 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
[섹션16] 프로젝트_4. 디자인 마무리하기
안녕하세요 :)좋은 강의 만들어주신 덕분에 감사히 참고하고 있습니다.섹션 16 U&I 프로젝트 4번째 동영상에서 궁금한 점이 있어 게시판에 여쭙게 되었습니다. pubspec.yaml에서 font weight를 설정해주었는데요,- family: Sunflower fonts: - asset: asset/font/Sunflower-Light.ttf - asset: asset/font/Sunflower-Medium.ttf weight: 500 - asset: asset/font/Sunflower-Bold.ttf weight: 700 강의에서 말씀주신대로 fontWeight 파라미터에서 FontWeight.w500 등을 통해 1번에서 설정했던 fontweight을 불러올 수 있었습니다. Text( 'D+1', style: TextStyle( color: Colors.white, fontFamily: 'Sunflower', fontSize: 50.0, fontWeight: FontWeight.w400, ), ),다만, 1번에서 설정했던 500과 700 외에 다른 숫자들도 weight로 설정할 수 있더라구요. 그렇다면 굳이 1번과 같이 weight에 500, 700등을 미리 설정하는 것이 어떤 차이를 줄 수 있는지 여쭙습니다! 도움을 부탁드립니다.감사합니다~!
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
PageController를 initState()에서 사용할 수 있는 이유가 무엇인가요
지난번 StatefullWidget 라이프사이클에서 Constructor > 2. Create State > 3.InitState > 4. didChangeDependencies > 5. build 이라고 알려주셨습니다. 이번강의에서는 initState()에서 Pagecontroller.animateToPage를 사용하여 위젯을 컨트롤 하였는데요. 아직 빌드되지 않은 위젯을 어떻게 InitState에서 컨트롤할 수 있는건가요?5단계 Build 단계에서 위젯에 컨트롤러를 할당한 이후에 사용할 수 있어야하지 않나요? 코드팩토리 디스코드에 질문하면 더욱 빠르게 질문을 받아 볼 수 있습니다![코드팩토리 디스코드]https://bit.ly/3HzRzUM - 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.
-
해결됨Flutter 앱 개발 기초
에뮬레이터 디버깅해도 변화가 없네요
오픈 카카오톡으로 문의주시면 더 빠르게 답변 받으실 수 있어요 :)run without debugging 오류가 납니다. run without debugging 실행하면 강의내용처럼 하얀바탕에 앱바 생겨야 하는데 변화가 없습니다.디버그 컨솔에는 뭐라 안내가 되는데 무슨 조치가 필요한모르겠네Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...Could not locate aapt. Please ensure you have the Android buildtools installed.No application found for TargetPlatform.android_x64.Is your project missing an android\app\src\main\AndroidManifest.xml?Consider running "flutter create ." to create one. 왕초보지만 잘 따라왔는데 어흑... ㅜㅜ
-
미해결Flutter로 SNS 앱 만들기
섹션9 게시물화면 _좋아요 결과를 화면에 반영
섹션9 게시물화면 _좋아요 결과를 화면에 반영 에서저는 하트를 클릭했는데 숫자가 변화 하지 않고, 색깔도 변화지 않네요. 아무리 봐도 모르겠요...하여 압축 파일 보냅니다