본문 바로가기

Web/Flutter

(4)
[Flutter] SocketException: OS Error: Connection refused, errno = 111, address = localhost 에러 해결 방안 에러 메시지 : SocketException: OS Error: Connection refused, errno = 111, address = localhost, port = 35658 발생 환경 API를 로컬 환경에 띄워 놓고 Flutter로 개발중인 어플에서 호출시에 발생 API 주소의 도메인은 "localhost"를 사용 에러 발생 이유 Android Emulator 사용시에 AVD는 현재 개발중인 컴퓨터의 환경이 아닌 모바일 환경에서 작동중인 것이고 이때 localhost를 사용한다고 해도 모바일 내에 alias가 설정되어 있다면 그쪽으로 접근하려고 할 것이고 접근이 거부되어 에러가 발생합니다. 수정 방안 따라서 localhost alias를 사용해야하는 경우를 자신의 IP를 직접 입력하는 방식으로..
[Flutter] naver_map_plugin 사용기 Flutter를 사용한 토이 프로젝트를 진행중 네이버 지도를 사용해보고 싶었는데 마침 플러그인이 있어서 소개겸 사용한 방법을 포스팅합니다. 플러그인 pub.dev : pub.dev/packages/naver_map_plugin 1. 사용방법 1. 네이버 클라우드 플랫폼에 가입하고 앱 등록 클라우드 플랫폼 : www.ncloud.com NAVER CLOUD PLATFORM cloud computing services for corporations, IaaS, PaaS, SaaS, with Global region and Security Technology Certification www.ncloud.com 가입 후 Console 메뉴로 들어갑니다. 콘솔 메뉴에서 application을 등록합니다. 어플리케..
[Flutter] SafeArea SafeArea는 위의 그림과 같이 StatusBar 혹은 TabView에서 TabLayout 영역을 피해서 위젯을 표시하고 싶을 때 사용합니다. 각 영역에 padding을 넣는 방식으로 작동하는데 좌우상하 부분 옵션으로 넣을 수 있습니다. 각 기기에서 앱 레이아웃을 제작할 때 기기마다 다르게 표시되는 경우에도 SafeArea로 감싸서 제작하면 해결되는 경우가 많습니다. SafeArea({ Key key, this.left = true, this.top = true, this.right = true, this.bottom = true, this.minimum = EdgeInsets.zero, this.maintainBottomViewPadding = false, @required this.child, }..
[Flutter] http 이용해서 이미지 파일 post로 보내기 개발 환경 - Flutter - Spring boot - kotlin 방법 1. Dependency 추가 //pubspec.yaml dependencies : http: ^0.12.1 //버전은 아무거나 2. 이미지 저장 코드 //밑에 코드를 참고하셔서 더 좋은 코드를 짜서 사용해주세요 //imageFileList에 보내고 싶은 이미지 파일들을 넣어주세요 List imageFileList = List(); var request = new http.MultipartRequest("POST", Uri.parse(imageApiUrl)); request.fields['parameter'] = '보내고 싶은 파라미터'; request.fields['parameter2'] = '보내고 싶은 파라미터2'; for ..