To learn about other tools you can use for Dart development, see Dart Tools.
If you have an up-to-date version of Dart Editor, you already have Dartium.
Otherwise, you can download Dartium directly:
For other versions of Dartium, including dev channel releases, see the download index.
You don’t usually need to do anything special to install Dartium:
just unarchive the ZIP file.
If you want Dart Editor to launch a particular copy of Dartium,
then put that copy inside the
of your Dart Editor installation directory,
replacing its original copy of Chromium.
To launch Dartium, navigate to its directory in your finder, and double-click the Chromium executable file. Or launch a web app in Dart Editor, or at the command line as described in Using command-line flags.
Use a script tag with a type
application/dart to link to your Dart
source file. Example:
<!DOCTYPE html> <html> <body> <script type="application/dart" src="app.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.
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.
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.
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:
DART_FLAGS='--checked' \ path/Chromium.app/Contents/MacOS/Chromium
Or (also on Mac):
DART_FLAGS='--checked' \ open path/Chromium.app