The Dart Dev Compiler (DDC) is an experimental development tool and transpiler. It is at a very early stage today. Its aims include the following:
DDC attempts to map to idiomatic EcmaScript 6 (ES6) as cleanly as possible. To do this while cohering to Dart semantics, DDC relies heavily on static type information, static checking, and runtime assertions.
DDC is intended to support a very large subset of Dart. If a program does not statically check, DDC will not result in valid generated code. Our goal is that a program execution (of a valid program) that runs without triggering runtime assertions should run the same on other Dart platforms under checked mode or production mode.
DDC does support untyped Dart code, but it will typically result in less readable and less efficient ES6 output.
DDC has the following project goals:
DDC is still in a very early stage as highlighted by our choice of ES6. ES6 itself is in active development across all modern browsers, but at various stages of support: kangax.github.io/compat-table/es6.
We are targeting the subset of ES6 supported in Chrome.
To try out DDC and/or give feedback, please read our usage page.
--html-reportoption to create a file summarizing compilation issues
-falias to the
--force-compilecommand line option
dev_compiler- that aliases to
Add this to your package's pubspec.yaml file:
dependencies: dev_compiler: "^0.1.24"
You can install packages from the command line:
$ pub get
$ flutter packages get
Alternatively, your editor might support
pub get or
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|0.1.24||Apr 1, 2016|
|0.1.23||Mar 31, 2016|
|0.1.22||Mar 15, 2016|
|0.1.21||Feb 22, 2016|
|0.1.20||Feb 19, 2016|
|0.1.19||Feb 19, 2016|
|0.1.18||Feb 12, 2016|
|0.1.17||Jan 29, 2016|
|0.1.16||Jan 28, 2016|
|0.1.15||Jan 13, 2016|
We analyzed this package, and provided a score, details, and suggestions below.
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Detected platforms: Flutter, other
Platform components identified in package:
Strong-mode analysis of
lib/src/analysis_context.dartfailed with the following error:
line: 30 col: 23
No setter named 'strongMode' in class 'AnalysisOptions'.
Strong-mode analysis of
lib/src/codegen/js_codegen.dartfailed with the following error:
line: 24 col: 8
Target of URI doesn't exist: 'package:analyzer/src/task/strong/info.dart'.
Fix further 8 Dart files.
Similar analysis of the following files failed:
Fix issues reported by
dartanalyzerreported 3 error(s) and 0 warning(s).
Package is pre-v1 release.
While there is nothing inherently wrong with versions of
0.*.*, it usually means that the author is still experimenting with the general direction API.
Maintain an example.
Create a short demo in the
example/directory to show how to use this package. Common file name patterns include:
example.dartor you could also use
Enable strong mode analysis.
Strong mode helps you to detect bugs and potential issues earlier.Start your
analysis_options.yamlfile with the following:
analyzer: strong-mode: true
|Dart SDK||>=1.12.0 <2.0.0|