Skip to content

Instantly share code, notes, and snippets.

@Fallenstedt
Created January 27, 2019 05:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fallenstedt/dbb31aaee7c697a04f7889767e1c99ae to your computer and use it in GitHub Desktop.
Save Fallenstedt/dbb31aaee7c697a04f7889767e1c99ae to your computer and use it in GitHub Desktop.
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