I am using Flutter with VSCODE in a MacOS.
Just imported a file MobileHomePage.dart
from AdobeXD and the file name is in RED - meaning some error in this file.
I followed this tutorial. At 5:33 it shows that I should add the follow packages (adobe_xd: ^0.1.4
and flutter_launcher_icons: "^0.7.3"
) in pubspec.yaml
> dependencies:
and dev_dependencies:
. And now this is what I have:
dependencies:
flutter:
sdk: flutter
adobe_xd: ^0.1.4
flutter_launcher_icons: "^0.7.3"
cupertino_icons: ^0.1.3
dev_dependencies:
flutter_test:
sdk: flutter
adobe_xd: ^0.1.4
flutter_launcher_icons: "^0.7.3"
Based on the video, at this point the VSCode should solve the problem (turning the color in withe) automatically. It does't happened. I still have the color in Red.
Digging inside the file MobileHomePage.dart
I have an error in the import 'package:adobe_xd/pinned.dart';
Target of URI doesn't exist: 'package:adobe_xd/pinned.dart'.
Try creating the file referenced by the URI, or Try using a URI for a file that does exist.darturi_does_not_exist
I've try to locate this lib in the flutter/adobe_xd
package and it doesn't exist.
~/Documents/vhosts/flutter/.pub-cache/hosted/pub.dartlang.org/adobe_xd-0.1.4/lib(stable)$ ll
total 48
drwxr-xr-x 7 ialves 27132083 224 29 Aug 11:31 .
drwx------ 10 ialves 27132083 320 29 Aug 11:31 ..
-rw-r--r-- 1 ialves 27132083 494 13 May 16:15 adobe_xd.dart
-rw-r--r-- 1 ialves 27132083 1884 13 May 16:57 blend_mask.dart
-rw-r--r-- 1 ialves 27132083 1865 13 May 17:20 gradient_xd_transform.dart
-rw-r--r-- 1 ialves 27132083 5685 13 May 17:20 page_link.dart
-rw-r--r-- 1 ialves 27132083 1022 13 May 16:15 specific_rect_clip.dart
The import 'package:adobe_xd/blend_mask.dart';
inside the MobileHomePage.dart
file is not throwing an error because the lib blend_mask.dart
already exists in adobe_xd-0.1.4/lib
. But the lib adobe_xd/pinned.dart
don't.
Maybe this is the origin of the issue.
I have tried: flutter clean
and flutter packages get
and restarted the VSCode and it didn't work. The adobe_xd/pinned.dart
can't still be located.
I don't know how to solve this issue (install this missing lib in the adobe_xd package ?). Any idea?
Opened issue in GtHub - AdobeXD / xd-to-flutter-plugin.
In your pubspec.yaml
change the adobe_xd version to this
adobe_xd: ^1.0.0+1
Run flutter pub upgrade
and flutter clean
and you should be good