본문 바로가기

FLUTTER203

Flutter 항목을 탭한 후에 Scaffold의 서랍을 닫는 방법은 무엇인가요?, How to close Scaffold's drawer after an item tap? 질문 스캐폴드의 드로어에서 항목을 탭한 후에 자동으로 숨기고 싶습니다. 플러터에서 어떻게 할 수 있을까요? 답변 Navigator.pop()는 Drawer 경로를 스택에서 제거하고 닫히도록합니다. 2023. 8. 23.
Flutter 앱에 대한 정의되지 않은 메소드 'map'에 대한 오류 / CocoaPod 오류, Error Regarding undefined method `map' for nil:NilClass for Flutter App / CocoaPod Error 질문 플러터 애플리케이션에 오류가 발생하고 있습니다. 터미널에서 "flutter run" 스크립트를 실행하면 Cocoapods에서 다음과 같은 오류가 발생합니다: "CocoaPods에서의 오류 출력: 검사를 찾는 중 오류 발생: undefined method 'map' for nil:NilClass" (첨부된 사진에서도 확인 가능). 이 문제를 해결하는 방법은 무엇인가요? 답변 ios 폴더에서 pod install 명령을 실행하려고 했습니다. @boonyongyang의 해결책은 필요하지만, 설치된 ffi가 2개인 것 같아 arch -x86_64 명령으로도 실행해야 했습니다. sudo arch -x86_64 gem install ffi # ios 폴더로 이동한 후 실행 arch -x86_64 pod ins.. 2023. 8. 23.
Flutter 플러터에서 콘솔 메시지를 출력하는 방법이 있나요?, Is there a way to print a console message with Flutter? 질문 I'm debugging an app, but I need to know some values in the fly, I was wondering if there's a way to print a message in console like console.log using Javascript. I appreciate the help. 앱을 디버깅하고 있지만, 실시간으로 일부 값을 알아야 합니다. Javascript를 사용하여 console.log와 같이 콘솔에 메시지를 출력하는 방법이 있는지 궁금합니다. 도움을 감사히 받겠습니다. 답변 print()은 아마도 당신이 찾고 있는 것입니다. 여기에 플러터 디버깅에 대한 추가 정보가 있습니다. 2023. 8. 23.
Flutter request.send()를 사용하여 응답 본문을 어떻게 가져올 수 있나요?, How to get response body with request.send() in dart 질문 I'm doing an api request uploading an image with var request = new http.MultipartRequest("POST", uri); var response = await request.send() in dart using flutter. I can then check the response code with for instance if (response.statusCode == 200) { print('ok'); } with other calls I can also get the response body with var result = response.body; however when using request.send() I can't seem t.. 2023. 8. 16.