Links
- Dart
- news | twitter | G+: dart, dartisans | SO |
- Groups / Lists: [email protected]
- Bugs / Issues (direct ≈ dartbug.com)
- Style Guide
- Source Code (browse)
- Browse online: bleeding_edge/dart
- Code Search
- Getting The Source
- Preparing your machine
- How to “Build Everything”
- 2011/10/building-google-dart-on-os-x-lion-with-xcode-4/
- solution for mysterious "BUILD FAILED" on Lion
- 2011/10/building-google-dart-on-os-x-lion-with-xcode-4/
- BuildBot: Build Status
- Misc
- Download
- Dart Language Specification (1.1)
- Symbols Redirecting Factory Constructors Mixins Metadata Expressions Object Identity Null Spawning an Isolate Method Invocation Super Invocation Sending Messages Getter and Setter Lookup Compound Assignment Assignable Expressions Identifier Reference Type Test Type Cast Type Promotion Type dynamic Type Void Parameterized Types Actual Type of a Declaration Least Upper Bounds Lexical Rules Comments Operator Precedence Appendix: Naming Conventions
- Book: Dart: Up and Running (Online)
- Articles
- Cookbook
- Contributing
- Wiki
- FAQ
- Dart ↔ JS
- Tutorials
- Invoking: Command line options
- Package Manager: Pub
- Samples
- Basic Types
- Topics
- Abstract classes and methods
- Constructors
- Dependency injection
- Equality
- Async: Futures
- Exceptions
- Generics
- Iteration
- Isolates and Concurrency
- Strings
- Testing
- Using JavaScript from Dart: The js Library
- API
- Language
- Libraries
- [Editor]
- Design, etc.
- News
- What's New with Dart's M2 Release
- Mixins in Dart
- The intent is to incorporate mixins into Dart in M3.
- Videos
- Different URL examples for docs.
http://api.dartlang.org/docs/channels/stable/latest/logging.html
http://api.dartlang.org/docs/channels/dev/latest/logging.html
http://api.dartlang.org/docs/channels/be/latest/logging.html
- Native Extensions for the Standalone Dart VM
Snippets
Detecting if you're running Dartium
# Javascript code. if (navigator.userAgent.indexOf('(Dart)') != -1) { // We have dart. }
ps: The older method of checking for navigator.webkitStartDart
being defined no longer works.
Detecting if you're running in dart2js
// identical(1, 1.0) is true for dart2js and false for the VM. bool runningDart2Js = identical(1, 1.0);
Detecting checked mode
void ensureCheckedMode() { try { Object a = "abc"; int b = a; print(b); // ensures that the code is not tree-shaken off throw new StateError("Checked mode is disabled. Use option -c."); } on TypeError { // expected } }
Reading entire stream as a string
import 'dart:async'; import 'dart:io'; String readText({Stream stream}) { var parts = <String>[]; var completer = new Completer(); stream .transform(new StringDecoder()) .listen( (String text) => parts.add(text), onDone: () => completer.complete(parts.join()), onError: (e) => completer.completeError(e)); return completer.future; } main() { readText(stream: stdin) .then((text) => print('<stdin> was "$text"')); }