-2

This is my code and this part, code is not running I don't know what I do please help me. Thanks. enter image description here

Yohan Malshika
  • 716
  • 1
  • 11
  • 20
nafashmn.ir
  • 111
  • 2
  • 2
  • 9

1 Answers1

0

http requires an Uri not an String

This is the signature of the method

Future<Response> get(Uri url, {Map<String, String>? headers})

So you should use

http.get(Uri.parse(url)).then //Your code
Cavitedev
  • 613
  • 4
  • 17