updateMyProfile static method
Updates the user's profile information asynchronously.
This method updates the user's profile with the provided name
, email
, mobile
,
status
, and image
details. The name
parameter is required, while the others are optional.
The flyCallback
parameter is a callback function that will be invoked with a FlyResponse object
when the operation completes. The FlyResponse object contains information about the success or failure
of the update operation.
Example usage:
await Mirrorfly.updateMyProfile(
name: 'John Doe',
email: 'john@example.com',
mobile: '1234567890',
status: 'Available',
image: 'profile_image_url',
flyCallback: (response) {
if (response.isSuccess) {
var data = profileUpdateFromJson(response.data);
// Profile update was successful
} else {
// Profile update failed
}
},
);
Implementation
static Future<void> updateMyProfile(
{required String name,
String? email,
String? mobile,
String? status,
String? image,
required Function(FlyResponse response) flyCallback}) {
return FlyChatFlutterPlatform.instance
.updateMyProfile(name, email, mobile, status, image, flyCallback);
}