void main() { print(test()); } String test() { // function definition return "hello world"; }
void main() { test(); } test() { //function definition print("function called"); }
enum Status { none, running, stopped, paused } void main() { print(Status.values); Status.values.forEach((v) => print('value: $v, index: ${v.index}')); print('running: ${Status.running}, ${Status.running.index}'); print('running index: ${Status.values[1]}'); }
main() { Runes input = new Runes( ' \u{1f605} '); print(new String.fromCharCodes(input)); }
void main(){ "A string".runes.forEach((int rune) { var character=new String.fromCharCode(rune); print(character); }); }
import 'dart:core'; void main(){ f1(); } f1() { String x = 'Runes'; print(x.codeUnits); }
import 'dart:core'; void main(){ f1(); } f1() { String x = 'Runes'; print(x.codeUnitAt(0)); }
import 'dart:mirrors'; void main(){ Symbol lib = new Symbol("foo_lib"); String name_of_lib = MirrorSystem.getName(lib); print(lib); print(name_of_lib); }
void main() { var usrMap = {"name": "Tom", 'Email': '[email protected]'}; usrMap.forEach((k,v) => print('${k}: ${v}')); }
void main() { Map m = {'name':'Tom','Id':'E1001'}; print('Map :${m}'); dynamic res = m.remove('name'); print('Value popped from the Map :${res}'); }
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more