i am creating a wallpaper app in which i am fetching wallpaper through an pexel api. but when i making a variable of response and give it value of http.get(url); and here i am pasting the link of curated wallpaper as given in api but it is giving an error like this : The argument type 'String' can't be assigned to the parameter type 'Uri'. can any one tell me how i can solve. and the tutorial i am following in that he is directly pasting link as a string and it is not giving any error to him. here is sample of that code :
import 'package:http/http.dart' as http;
getTrendingWallpaper() {
var trendingUrl = "https://api.pexels.com/v1/curated?per_page=1";
var response = http.get(trendingUrl); // this is giveing this error : The argument type 'String' can't be assigned to the parameter type 'Uri'
}