updateMyProfileImage method
Future<void>
updateMyProfileImage(
- String image,
- dynamic callback(
- FlyResponse response
override
This method is used to update the profile image.
Implementation
@override
Future<void> updateMyProfileImage(
String image, Function(FlyResponse response)? callback) async {
//updateProfileImage
String? profileResponse;
try {
profileResponse = await mirrorFlyMethodChannel
.invokeMethod('updateMyProfileImage', {"image": image});
var res = convertProfileUpdateJsonFromString(profileResponse);
callback?.call(FlyResponse(true, res, "user profile image updated"));
} on PlatformException catch (e) {
LogMessage.d("Platform Exception =", " $e");
callback?.call(FlyResponse(false, FlyConstants.empty, FlyConstants.empty,
FlyException(e.code, e.message, e.details)));
} on Exception catch (e) {
LogMessage.d("Exception ", " $e");
callback?.call(FlyResponse(false, FlyConstants.empty, FlyConstants.empty,
FlyException(FlyErrorCode.unHandle, FlyErrorMessage.unHandle, e)));
}
}