error: The argument type 'String' can't be assigned to the parameter type 'Uri'. (argument_type_not_assignable at [flutterlaravelfluttercrud_app] lib\widgets\Services.dart:18) code example

Example: the argument type 'string' can't be assigned to the parameter type 'uri'. flutter

More generally, if you previously used http.get(someString), http.post(someString), etc. you instead will need to use http.get(Uri.parse(someString)), http.post(Uri.parse(someString)), and so on. (package:http formerly called Uri.parse internally to convert a String into a Uri for you.)

Tags:

Dart Example