getUserProfile method

Future<UserProfile> getUserProfile()

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 {
      var userProfile = new UserProfile._fromJson(val);
      if (userProfile.thumbnail != null) {
        await userProfile.thumbnail!._readBytes();
      }
      if (userProfile.photo != null) {
        await userProfile.photo!._readBytes();
      }
      return userProfile;
    }
  });
}