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
296 B
Dart
Raw Normal View History

docs(server-communication/dart): add sample closes #829
2016-02-10 17:27:14 -02:00
// #docregion
docs(server-communication): cleanup, mainly for Dart (#1455) - Dart code: fix issues raised by @thso during review. - Dart code: remove "show x" clauses from imports. - Dart add docsync config file. - Prose: make consistent use of _Http variables; otherwise use "HTTP". - Prose: add links to the demos list. * _heroesUrl as static const
2016-05-20 17:14:37 -07:00
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
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};
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.1 Page: 163ms Template: 3ms
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