Logo
Explore Help
Sign In
honeymoose/angular-cn
1
0
Fork 0
You've already forked angular-cn
Code Issues Pull Requests Packages Projects Releases Wiki Activity
angular-cn/public/docs/_examples/server-communication/dart/lib/toh/hero.dart

15 lines
305 B
Dart
Raw Normal View History

docs(server-communication/dart): add sample closes #829
2016-02-10 17:27:14 -02:00
// #docregion
class Hero {
final int id;
final String name;
Hero(this.id, this.name);
[review-pending] docs(dev guide): server-communication - new prose New Dart prose, update Dart and Ts code + guide/server-communication/ts: update to docs and example code + guide/server-communication/dart: new prose, update example code + ignore all npm-debug.logs + make Jade ul li TOC elements more compact.
2016-05-13 13:32:54 -07:00
factory Hero.fromJson(Map<String, dynamic> hero) =>
new Hero(_toInt(hero['id']), hero['name']);
docs(server-communication/dart): add sample closes #829
2016-02-10 17:27:14 -02:00
Map toJson() => {'id': id, 'name': name};
[review-pending] docs(dev guide): server-communication - new prose New Dart prose, update Dart and Ts code + guide/server-communication/ts: update to docs and example code + guide/server-communication/dart: new prose, update example code + ignore all npm-debug.logs + make Jade ul li TOC elements more compact.
2016-05-13 13:32:54 -07:00
static int _toInt(id) => id is int ? id : int.parse(id);
docs(server-communication/dart): add sample closes #829
2016-02-10 17:27:14 -02:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.1 Page: 133ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API