Instantly share code, notes, and snippets.

Chris Buckett chrisbu

View GitHub Profile
View ditest.dart
import 'package:di/di.dart';
import 'package:di/dynamic_injector.dart';
void main() {
var modules = [new SimpleModule(), new EnterpriseModule()]; // last one wins!
var di = new DynamicInjector(modules:modules);
var foo = di.get(Foo);
var bar = di.get(Bar);
View words.dart
<!DOCTYPE html>
<meta charset="utf-8">
<title>Sample app</title>
<link rel="stylesheet" href="words.css">
<!-- This is the bootstrap script for Polymer.
Use this INSTEAD of dart.js -->
View classes.dart
import 'dart:html';
void main() {
var carousel = query(".carousel");
var classList = [];
carousel.children.forEach((childElement) => classList.addAll(childElement.classes));
View polymerclicker1.css
body {
background-color: #F8F8F8;
font-family: 'Open Sans', sans-serif;
font-size: 14px;
font-weight: normal;
line-height: 1.2em;
margin: 15px;
h1, p {
View coverage.txt
Coverage target process (pid 6476) found listening on port 51189.
Debuggee isolate id 7114 created.
Debuggee isolate id 7114 shut down.
Sending kill signal to process 6476.
Connection closed by coverage target
Process 6476 terminated with exit code 0.
Coverage info collected from 42 breakpoints:
|library mytest;
View gist:4272378
try {
// try and write to the stream
on StreamException {
// handle the exception
View AsyncTest.html
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="AsyncTest.css">
View AsyncTest.dart
void main() {
test('aync test', () {