Answers for "the argument type 'string?' can't be assigned to the parameter type 'object'."

1

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

#old code               #Replace with

http.get(someString)    http.get(Uri.parse(someString))

http.post(someString)   http.post(Uri.parse(someString))
Posted by: Guest on October-14-2021
0

Text: The argument type 'String?' can't be assigned to the parameter type 'String'

in url case use:
    var response = await http.get(Uri.parse(url));
    
in widgets use:
    Text(data[index]['name'].toString())
Posted by: Guest on September-16-2021

Code answers related to "the argument type 'string?' can't be assigned to the parameter type 'object'."

Code answers related to "Dart"

Browse Popular Code Answers by Language