Cw 586 display user twitter image in birdpay (#1315)

* Update address_validator.dart

* add twitter profile image

* mastodon profile image

* fix data types
This commit is contained in:
Serhii
2024-03-01 21:38:48 +02:00
committed by GitHub
parent 2549b0fa0a
commit 10fd32fb2e
9 changed files with 200 additions and 86 deletions
+4 -1
View File
@@ -1,12 +1,14 @@
class MastodonUser {
String id;
String username;
String profileImageUrl;
String acct;
String note;
MastodonUser({
required this.id,
required this.username,
required this.profileImageUrl,
required this.acct,
required this.note,
});
@@ -14,9 +16,10 @@ class MastodonUser {
factory MastodonUser.fromJson(Map<String, dynamic> json) {
return MastodonUser(
id: json['id'] as String,
username: json['username'] as String,
username: json['username'] as String? ?? '',
acct: json['acct'] as String,
note: json['note'] as String,
profileImageUrl: json['avatar'] as String? ?? ''
);
}
}