getUserProfile method
Returns the UserProfile data.
Implementation
Future<UserProfile> getUserProfile() async {
return await _channel.invokeMethod("getUserProfile").then((dynamic val) async {
if (val == null)
return new UserProfile();
else {
final userProfile = UserProfile._fromJson(val);
final thumbnail = userProfile.thumbnail;
if (thumbnail != null) {
await thumbnail._readBytes();
}
final photo = userProfile.photo;
if (photo != null) {
await photo._readBytes();
}
return userProfile;
}
});
}