AngularDart installed with Dart 2 - dart

Is AngularDart installed with Dart 2?
I can do dart --version but how do I know which version AngularDart?

Is AngularDart installed with Dart 2?
No, AngularDart is not included in the Dart SDK.
AngularDart is a separate pub package that you'll include as a dependency in your Dart project's pubspec.yaml (as explained by Günter), on a per-project basis.

Add
dependencies:
angular: "^5.0.0-alpha+13"
to pubspec.yaml and run
pub get
The output and the created pubspec.lock tell you the fetched package versions.
For this Angular version you need Dart 2

Related

How do I force the code not to required to run on earlier Dart version (earlier than Dart 2.2)?

I got Dart version 2.9.0. And my flutter is running with that version now.
However, I got this message:
Set literals weren't supported until version 2.2, but this code is required to be able to run on earlier versions
But I don't want it to be required to run on Dart versions earlier than 2.2.
How do I force it to run only on versions after 2.2 ?
You can edit the dart sdk constraints in your pubspec.yaml file to only use dart versions 2.2 and later.
environment:
sdk: '>=2.2.0 <3.0.0'
See this site for more information about the pubspec.yaml file.

What is pub tool?

I was studying basics of Flutter and Dart development and came across package manager called pub. What is it and what is it's importance in Flutter development?
Pub is the package manager for the Dart programming language, containing reusable libraries & packages for Flutter, AngularDart, and general Dart programs.
Some basic command:
Use pub get to get dependencies
Use pub upgrade to upgrade a dependency
Use pub publish to make your library available for others
You can find all packages here.
Also you can develop your own package, find the details on official site.
Pub is a package manager for dart to know more about pub see this: https://www.dartlang.org/tools/pub

How list/remove globally installed Dart dependencies?

I try to figure out how to manage pub packages. For example, I have the following pubspec.yaml:
name: app
dependencies:
intl: any
browser: any
polymer: any
transformers:
- polymer
After time I consider to remove intl package. As far as I understand running pub get again automatically remove unused packages (to be more precise it removes links but not actual files). If so how can I list/remove actual packages available globally (on Ubuntu under /home/username/.pub-cache/hosted/pub.dartlang.org/)?
Use the den tool. It's a community-contributed tool that provides various utilities for working with pub packages.
den uninstall thing_i_do_not_need_anymore
Only manually by deleting them using your OS tools. There is no pub ... support for that.
pub ... only works for the current project (current working directory) and it doesn't know if versions are used by other projects on your disk.

How can I test the latest Polymer lib when it requires an older SDK?

I wanted to give the latest Dart Polymer lib a spin, so I updated the pubspec file and ran a pub install. However, the install fails with the following message:
Pub install failed, [1] Resolving dependencies.........
Package polymer requires SDK version >=0.8.1+1 but the current SDK is
0.7.6+4.r28108
Is it somehow possible to use the latest Polymer version via pubspec, or do I need to build the SDK myself from the sources?
https://www.dartlang.org/tools/editor/ has links to the bleeding edge, continuous build DartEditor
https://storage.googleapis.com/dart-editor-archive-continuous/latest/darteditor-win32-32.zip
https://storage.googleapis.com/dart-editor-archive-continuous/latest/darteditor-win32-64.zip
As of today, you should be able to upgrade 0.8.1.2 if you go to Help > About Dart Editor.
It seems pretty common that the libraries update a day or two before the SDK, so normally when I run into this problem I put in the pubspec something like the following until I can update the SDK:
dependencies:
polymer: "< 8.0.0"

dart: cannot resolve class name 'ListBase' from 'ListWrapper

Tried the webui_click tutorial target
Got an error
cannot resolve class name 'ListBase' from 'ListWrapper
Using this version of Dart Editor
Dart Editor version 0.4.5_r21094
Dart SDK version 0.4.5.1_r21094
A new version [21823] is ready to install
Updated Dart Editor to latest version under Help/About Dart Editor and problem went away
Dart Editor version 0.5.0_r21823
Dart SDK version 0.5.0.1_r21823

Resources