'Syntax for Specifying file path (relative and absolute)
I want to know a way of specifying the path of files. I am currently following:
href="css/lib/bootstrap.css"
I find that some people specify the file location in a different way:
templateUrl: 'lib:components/bootstrap.css'
I am not able to understand how to create/specify custom directories, as mentioned above using lib: or package:.
A brief on creating custom packages in dart would be very helpful.
Solution 1:[1]
For absolute path
import 'package:your_app_name/lib/some_dir/some_file.dart';
But skip the lib/, so:
import 'package:your_app_name/some_dir/some_file.dart';
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | M Imam Pratama |
