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