This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// dartdoc for the description; one combined annotation | |
/// Compile stuff. | |
@Task(depends: const [init]) | |
compile() { | |
... | |
} | |
// dartdoc for the description; separate task and depends annotations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is gist. | |
There are many like it, but this one is mine. | |
It is my life. | |
I must master it as I must hamster my life. | |
Without me gist is useless. | |
Without gist, I am useless. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="score" class="score"></div> | |
<canvas id="myCanvas" width="500" height="500"></canvas> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person { | |
Date birthdate; | |
int get age => new DateTime.now().difference(birthdate).inYears; | |
} | |
void _main() { | |
var p = new Person()..birthdate = new DateTime(1978); | |
print(p.age); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person { | |
Date birthdate; | |
int get age => new DateTime.now().difference(birthdate).inYears; | |
noSuchMethod(i) => super.noSuchMethod(i); | |
} | |
void main() { | |
var p = new Person()..birthdate = new DateTime(1978); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo { | |
int bar; | |
int baz() => bar; | |
} | |
void main() { | |
for (int i = 0; i < 5; i++) { | |
print('hello ${i + 1}'); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:html'; | |
void main() { | |
DivElement div = new DivElement(); | |
div.te | |
for (int i = 0; i < 5; i++) { | |
print('hello ${i + 1}'); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"origin": "dartlab.org", | |
"url": "http://dartlab.org/#:gistId", | |
"history": [] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
for (int i = 0; i < 5; i++) { | |
print('hello ${i + 1}'); | |
print('hello ${i + 1}'); | |
print('hello ${i + 1}'); | |
print('hello ${i + 1}'); | |
print('hello ${i + 1}'); | |
} | |
} |