Flutter-Blog-App icon indicating copy to clipboard operation
Flutter-Blog-App copied to clipboard

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

Open PoojanShrz opened this issue 4 years ago • 1 comments

On the Network Handler page the following error shows up

Error: The argument type 'String' can't be assigned to the parameter type 'Uri'.
 - 'Uri' is from 'dart:core'.
    var response = await http.get(url);

It may be because of the http package which was updated to 0.13.0

PoojanShrz avatar Mar 15 '21 18:03 PoojanShrz

now you need to use the 'Uri.parse()' var url = Uri.parse('http://websiteapi');

CadisRaziel avatar Aug 08 '21 21:08 CadisRaziel