xxxxxxxxxx
Change import 'dart:html'; to import 'package:http/http.dart' as http;
and then change pubspec.yaml files dependencies to
dependencies:
flutter:
sdk: flutter
http:
and click pub get
xxxxxxxxxx
I had a similar issue while developing for a mobile app, but it turned out that I imported the package dart.html accidentally. I just removed it and I was able to run the program.