Issue
I have been learning Angular Dart since about 3 weeks ago but I’m having really a hard time with it specially that the learning resources for this new language are really limited.
Anyway, my problem is I can’t import any thing from the ” angular gallery section ” library.
like when I try:
import'package:angular_gallery_section/annotation/gallery_section_config.dart';
or
import 'package:angular_gallery_section/annotation/gallery_section_config.dart';
so I can’t import any thing from angular_gallery_section library (there is always an error)
I tried to adjust ‘ pubspec.yaml ‘ file like this:
environment:
sdk: '>=2.1.0-dev.5.0 <3.0.0'
# angular_gallery:
# arget: ":angular_gallery"
# import: "package:angular_gallery/builders.dart"
# builder_factories: [galleryAppBuilder, galleryLibBuilder, syntaxHighlightBuilder]
# build_extensions: {
# ".html": [".dart"],
# "$web$": ["index.html", "main.dart", "style.scss"]}
dependencies:
angular: ^5.1.0
# angular_gallery_section:
# path: ../../angular_gallery_sections
angular_forms: ^2.1.0
async: ^2.0.8
build: '>=0.11.1 <2.0.0'
build_config: '>=0.2.6 <0.4.0'
built_collection: ^4.0.0
collection: ^1.14.10
angular_components: '>=0.9.0 <=0.10.0'
angular_router: ^2.0.0-alpha+19
sass_builder: ^2.0.2
intl: '>=0.14.0 <0.16.0'
glob: ^1.1.5
markdown: ^2.0.0
dev_dependencies:
path: ^1.6.1
test: ^1.0.0
build_web_compilers: '>=0.3.6 <0.5.0'
build_runner: '>=0.8.10 <2.0.0'
but the problem haven’t been solved yet, the path for the angular_gallery_section isn’t working so I think I really missed up 🙁
Solution
Instead of
# angular_gallery_section:
# path: ../../angular_gallery_sections
add
angular_gallery_section:
git:
url: git@github.com:dart-lang/angular_components_example.git
path: angular_gallery_section
Answered By – Günter Zöchbauer
Answer Checked By – Cary Denson (FlutterFixes Admin)