Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'dart:html';
- import 'dart:async';
- import 'dart:math';
- CanvasElement myCanvas;
- CanvasRenderingContext2D context;
- var randomGenerator = new Random();
- DivElement output = querySelector('#output');
- Duration longDuration = new Duration(seconds:3);
- Duration shortDuration = new Duration(milliseconds: 500);
- Future longPause() => new Future.delayed(longDuration);
- Future shortPause() => new Future.delayed(shortDuration);
- main() {
- myCanvas = querySelector("#mycanvas");
- context = myCanvas.context2D;
- for (int i = 1; i < 2; i++) {
- context.beginPath();
- context.lineWidth = 10;
- context.strokeStyle = blue();
- var start = new Point(200, 300);
- var end = new Point(200, 400);
- context.moveTo(start.x, start.y);
- context.lineTo(end.x, end.y);
- context.stroke();
- // ignore: missing_identifier
- var = ();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement