I am a student and very new to flutter/dart so I am incredibly sorry if I make mistakes along the way or just sound like a noob.
I have an application I am currently working on and I have some classes I want to import.
I want to make a simple console application, but do not copy and to always have the same updated classes how do I import the classes from a folder.
I tried the following:
made a folder called "WindowsApp"
made another folder called "lib" (because for some reason it is the only I can run the main)
made a file "main.dart"
and had the following code
import '<directory>\\foo.dart';
void main(){
print('test');
}
Does it say that the directory doesn't exist? In java, I remember doing something similar and it worked, but I seem to not have the same logic work here.
The research I have done it is still foggy as to what to do because one answer is to use Source, another provided what I wanted, but didn't show the code and the code that was shown introduced a new thing called the library. Is there no simple way like java where you just put in the directory and that is it?
Do I need a full-blown project with a YAML and all if I wanted to use APIs and such?
/foo.dart
, not\foo.dart
– Robin