Вопрос

I have the following project:

project structure

I have packages configured via pubspec.yaml :

dependencies:
  web_ui: any

After installing from pub the console output wrote that everything is ok:

Running pub install ...
Resolving dependencies...
Dependencies installed!

But when I try to import the class from this package in my dart.file, I get the compilation error:

compilation error

Looks like it doesn't find anything inside the packages being installed. I've checked the file system and found that inside the packages there are only links instead of directories with .dart files. This links point to the real directories, but looks like the IDE doesn't see this dirs.

I am using SpringToolSuite Version: 3.1.0.RELEASE and Dart plugin v 0.2.9 build 16251. OS: Windows 8

Thank you!

Это было полезно?

Решение

Drop the 's' in packages and try:

import 'package:web_ui/component_build.dart';
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top