Dev/Flutter 46

Flutter DropdownButton 글자 중앙정렬

Flutter 에서 DropdowButton 의 텍스트를 중앙정렬 하기 위한 방법 1. DropdownButton 을 최대로 확장한다. DropdownButton( isExpanded: true, ... ) 2. DropdownButton 의 DropdownMenuItem 에서 child 를 Center 로 감싸준다. return DropdownMenuItem( value: value, child: Center( child: Text( value, textAlign: TextAlign.center, ), ), ); https://stackoverflow.com/a/63995395/3897810 How to center text in DropdownButton? I'm trying to make the D..

Dev/Flutter 2023.12.16

Flutter - Could not build the precompiled application for the device

Could not build the precompiled application for the device. Error (Xcode): Sandbox: rsync.samba(79798) deny(1) file-write-create /.../build/ios/Debug-iphoneos/Flutter.framework Error (Xcode): Sandbox: dart(79778) deny(1) file-write-create /.../build/ios/Debug-iphoneos/.last_build_id Error (Xcode): Flutter failed to write to a file at "/.../build/ios/Debug-iphoneos/.last_build_id". Xcode15 이상으로 업..

Dev/Flutter 2023.11.10

Flutter TextField 에 텍스트 입력하는 방법

1. (사용할 곳 어딘가에) TextField() 위젯을 생성 ... TextFiled() ... 2. TextField 위젯에 넣을 컨트롤러 생성 var textFieldEditingController = TextFieldEditingController(); 3. 위의 콘트롤러를 TextField 위젯에 넣기 TextField(controller: textFieldEditingController); 4. TextFiledEditingController 의 text 함수에 텍스트를 넣으면 된다. textFieldEditingController.text = '입력하고자 하는 텍스트';

Dev/Flutter 2023.10.27

Flutter SpeechToText 에서 한국어 설정

Flutter 에서 말(speaking)을 문자로 변환하기 위해서 SpeechToText 라이브러리를 사용했다. 개발자들이 제일 많이 사용하는 라이브러리인것 같다. Google 에서 Cloud 상에서 제공하는 기능이 있지만 유료기에 일단 패스. 기본 설정 SpeechToText speechToText = SpeechToText(); ... var available = await speechToText.initialize(); if (available) { ... speechToText.listen(onResult: (result) { ... }, localeId: 'ko-KR'); } 기본 언어가 영어이기 때문에 영어를 사용한다면 localeId 가 없어도 된다. speechToText.listen(on..

Dev/Flutter 2023.10.24

XCode 15 에서 iOS17 앱 빌드가 실패하는 이슈

오류 Error (Xcode): Sandbox: rsync.samba(37827) deny(1) file-write-create /.../StudioProjects/mvp_english_by_gpt/build/ios/Debug-iphonesimulator/Flutter.framework 1. 해당 프로젝트를 Xcode 로 연다. 2. 왼쪽 사이드바에서 Runner 를 선택한다. 3. Runner 창 에서 TARGETS 에서 Runner 를 선택한다. 4. "Build Settings" 탭을 선택한다. 5. 해당 탭 영역의 탐색창에서 "ENABLE_USER_SCRIPT_SANDBOXING" 검색해서 찾는다. 6. ENABLE_USER_SCRIPT_SANDBOXING 해당 키의 값이 "No" 그렇다면 비활성..

Dev/Flutter 2023.10.12