|
|
@ -22,6 +22,7 @@ class MyProfile { |
|
|
|
String? symmetricKey; |
|
|
|
DateTime? loggedInAt; |
|
|
|
File? image; |
|
|
|
String? imageLink; |
|
|
|
String messageExpiryDefault = 'no_expiry'; |
|
|
|
|
|
|
|
MyProfile({ |
|
|
@ -33,6 +34,7 @@ class MyProfile { |
|
|
|
this.symmetricKey, |
|
|
|
this.loggedInAt, |
|
|
|
this.image, |
|
|
|
this.imageLink, |
|
|
|
required this.messageExpiryDefault, |
|
|
|
}); |
|
|
|
|
|
|
@ -54,6 +56,7 @@ class MyProfile { |
|
|
|
loggedInAt: loggedInAt, |
|
|
|
messageExpiryDefault: json['message_expiry_default'], |
|
|
|
image: json['file'] != null ? File(json['file']) : null, |
|
|
|
imageLink: json['image_link'], |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
@ -82,6 +85,7 @@ class MyProfile { |
|
|
|
'logged_in_at': loggedInAt?.toIso8601String(), |
|
|
|
'message_expiry_default': messageExpiryDefault, |
|
|
|
'file': image?.path, |
|
|
|
'image_link': imageLink, |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
@ -98,7 +102,7 @@ class MyProfile { |
|
|
|
|
|
|
|
if (json['image_link'] != '') { |
|
|
|
File profileIcon = await getFile( |
|
|
|
json['image_link'], |
|
|
|
'$defaultServerUrl/files/${['image_link']}', |
|
|
|
json['user_id'], |
|
|
|
json['symmetric_key'], |
|
|
|
); |
|
|
|