[Flutter] The argument type 'String' can't be assigned to the parameter type 'Uri'.

gozero·2021년 7월 25일

에러 코드

The argument type 'String' can't be assigned to the parameter type 'Uri'.


해결 방법

http 버전이 0.13.3으로 업그레이드 되면서 이후로 Uri를 사용하여야 한다.

http.Response result = await http.get(Uri.parse(url));
profile
이것저것 앱으로 만드는 것을 좋아하는 모바일 개발자입니다.

0개의 댓글