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.
Open flutter project folder in Command Prompt or Terminal and execute flutter pub get command. This command would download and install the newly added http library. 4. After executing above command, it will download and install the http.dart package in our project.
Try Creating the file referenced by the URI, our Try using a URI for a file that dose exist. dart (uri_dose_not_exist), No quick fix available. 1. To solve this error first we need to open pubspec.yaml file present in our Flutter project.
The http.dart package file contains high level function and classes to manage and retrieve HTTP resources. The package file is fully platform independent and can run on both Android and iOS platforms. The http.dart package comes inbuilt with older flutter version but now we have to manually import and configure this into our project.
The Pinned widget implements the responsive resize model in Adobe XD. With it, you can pin the edges of the child within the available space, pin its center within the space, and/or give it a fixed size. The Pinned.fromPins constructor accepts a horizontal and vertical pin, as well as a child widget:
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
Install Pubspec Assist extension from extensions.
Go to pubspec.yaml and hit CTRL+SHIFT+P
Search for pubspec in the opened line and select Pubspec Assist: Add/update Dependencies input line
Enter adobe_xd in the line and it will automatically add the latest version to depencies
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With