How can I import dart:html in a simple .dart script?

54 Views Asked by At

I want to execute a .dart file with dart:html core library, but I get this error(s). Image here

Important: I'm not using Flutter.

Any ideas?

I've been looking for solutions to the following problem, but haven't found anything.

1

There are 1 best solutions below

0
randomuser123 On

I figured it out. Activate webdev:

dart pub global activate webdev

Create pubspec.yaml and add those dev_dependency:

lints: ^2.0.0 build_runner: ^2.1.4 build_web_compilers: ^3.2.1