How to insert a parameter into the middle of a URL in flutter?

1,482

You should add all parameters to the map

 var queryParameters = {
    'q': cityName,
    'appid': 'b6907d289e10d714a6e88b30761fae22',
  };

 var uri = Uri.http('samples.openweathermap.org', '/data/2.5/forecast', queryParameters);
Share:
1,482
Programming Learner
Author by

Programming Learner

Learning iOS..

Updated on December 11, 2022

Comments