[Solved] i am getting Error: Not found: ‘dart:html’


As described on the front-page of the API documentation for Dart: https://api.dart.dev

  • dart:html: DOM manipulation for web apps (available only to web apps).
  • dart:io: I/O for non-web apps.

So dart:html can only be used if your target platform is web (so Dart code compiled to JavaScript). In your case, you are trying to make an Android application which runs native on your phone. You can therefore not use dart:html but should instead look into dart:io (which are not available for web-applications) if you need access to IO operations.

5

solved i am getting Error: Not found: ‘dart:html’