Dartium: Chromium with the Dart VMSend feedback
To learn about other tools you can use for Dart development, see Dart Tools for the Web.
Otherwise, you can install Dartium directly:
For other versions of Dartium, including dev channel releases, see the zip file index.
You don’t usually need to do anything special to install Dartium. However, you may need to configure your IDE so that it can find Dartium. In WebStorm, for example, you can do this in Preferences > Languages & Frameworks > Dart. In the Dartium path field, type or browse to the location of the Chromium executable.
To launch Dartium, navigate to its directory in your finder, and double-click the Chromium executable file. Or launch a web app from your IDE, or at the command line as described in Using command-line flags.
Linking to Dart source
Use a script tag with a type
application/dart to link to your main Dart
source file. Example:
<!DOCTYPE html> <html> <body> <script type="application/dart" src="main.dart"></script> <!-- Support for non-Dart browsers. --> <script src="packages/browser/dart.js"></script> </body> </html>
For more information on linking to source code, see the article Embedding Dart in HTML.
Advanced use cases
This section contains advanced information. If you need to detect whether Dart is supported in the browser, set the API keys in order to use one of the Google APIs, or specify Dartium flags at the command line, read on. Otherwise, you can skip this section.
Detecting Dart support
Setting API keys
To use some features in the Google APIs, such as geolocation from the Google Maps API, you need to set the API keys in Dartium. You can either build a special version of Dartium with the API keys baked in, or you can specify the keys at runtime. For more information on how to acquire and use API keys, see API Keys.
Using command-line flags
Because Dartium is based on Chromium, all Chromium
should work. In some cases, you might want to specify Dart-specific
flags so that you can tweak the embedded Dart VM’s behavior. For
example, while developing your web app, you might want the VM to verify
type annotations and check assertions. To achieve that, you can enable
checked mode (the VM’s
On Linux, you can specify flags by starting Dartium as follows:
open path/Chromium.app --args --checked