From: Kevin Worth Date: Sun, 3 May 2020 02:40:48 +0000 (-0400) Subject: Add class RegisteredUser with name and character attributes X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=48fe30d49300202b6cfb733e93c45a4e2ca06722;p=lmno.games Add class RegisteredUser with name and character attributes This data model will be used when POSTing to /register See: git://git.cworth.org/git/empires-api/api.text at commit 0411bdc --- diff --git a/flutterempires/lib/registered_user.dart b/flutterempires/lib/registered_user.dart new file mode 100644 index 0000000..4e1a2ab --- /dev/null +++ b/flutterempires/lib/registered_user.dart @@ -0,0 +1,13 @@ +class RegisteredUser { + final String name; + final String character; + + RegisteredUser({this.name, this.character}); + + factory RegisteredUser.fromJson(Map json) { + return RegisteredUser( + name: json['name'], + character: json['character'], + ); + } +}