강의

멘토링

로드맵

Inflearn Community Q&A

dedication122579's profile image
dedication122579

asked

Create web, telegram bot, REST API, mobile app with crawling

flutter를 이용하여 모바일 앱 만들기

Written on

·

262

0

마지막 강의 'flutter를 이용하여 모바일 앱 만들기' 중 3분 경의 코드 따라 작성해보았는데요. 

작성한 코드

class MyApp extends StatelessWidget {

  fetchMonitors() async {

    var response = await http.get('생성한 URL');

    print(response.body);

  }

아래와 같은 오류 메세지가 나타납니다. 

lib/main.dart:10:35: Error: The argument type 'String' can't be assigned to the parameter type 'Uri'.

 - 'Uri' is from 'dart:core'.

이 문제는 어떻게 해결하면 좋을지 도움 주시면 감사하겠습니다. 

django웹-크롤링rest-apiFlutterpython

Answer 1

0

jinsyu님의 프로필 이미지
jinsyu
Instructor


url부분을 스트링으로 넣지 마시고,

http.get(Uri
.parse('URL'))

uri로 변환하셔서 넣어보세요.
dedication122579's profile image
dedication122579

asked

Ask a question