commit 0a7ff3dd715ff2c645fc5924a1ec6175d20df37f parent 0141f17fa88eb08d111d4188da57ec801fc8be0e Author: Jackson G. Kaindume <seestem@merely.tech> Date: Wed, 31 Aug 2022 16:52:44 +0200 [cyrto] add public account data Diffstat:
M | cyrto/lib/cyrtophora.dart | | | 1 | + |
A | cyrto/lib/src/account.dart | | | 10 | ++++++++++ |
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/cyrto/lib/cyrtophora.dart b/cyrto/lib/cyrtophora.dart @@ -5,3 +5,4 @@ library cyrtophora; export 'src/utils.dart'; export 'src/validate.dart'; export 'src/data.dart'; +export 'src/account.dart'; diff --git a/cyrto/lib/src/account.dart b/cyrto/lib/src/account.dart @@ -0,0 +1,10 @@ +/// Account Public Data +class PublicAccount { + String username; + PublicAccount(this.username); + + /// Generate input from JSON + factory PublicAccount.fromJson(dynamic json) { + return PublicAccount(json['username'] as String); + } +}