Dart confuses TYPE error

I am building a web application using dart with web_ui.

Everything worked fine until I added the web_ui pub, and now when I try to run the build.dart file, I get an error message:

Uncaught Error: type 'AttributeName' is not a subtype of type 'String' of 'name'. 

What does it mean?

From what I understand, this means that there is somewhere an instance called "name" of the class "AttributeName" that extends the class "String".

I searched my entire project and there was no class with the name "AttributeName" anywhere, there was no instance of "name" anywhere.

I have the latest Dart and SDK editor:

 Dart Editor version 0.4.7_r21658 Dart SDK version 0.4.7.5_r21658 

EDIT: this is my build.dart file:

 import 'package:web_ui/component_build.dart'; import 'dart:io'; void main() { build(new Options().arguments, ['web/menyplattan.html']); } 

In addition, I updated all the pubs.

+6
source share
1 answer

This message looks like this: web_ui does not perform type checking.

A similar SO question MarioP links have a stack that shows this message coming from the ui web library itself.

Do you have an xmlns attribute in your html? Take a look at this web ui question .

The attribute name is defined in the html5lib library. Web-ui may be expecting a newer version of this library, but it will get an older version. Make sure you have installed the pub. You can also try to delete the folder with your packages and make a new bundle for installation.

This may be caused by outdated packages, but it may also be a bug in web-ui. See if you can get stacktrace and the error message file or post it to the web-ui mailing list .

+1
source

All Articles