Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A simple dart game.
import 'dart:html';
void main() {
final buttonElement = document.querySelector('button');
buttonElement.onClick.timeout(
new Duration(seconds: 1),
onTimeout: (sink) => sink.addError('BOOM!')
)
.listen(
(event) {},
onError: (err) => print(err)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment