updateUserAttribute method

Implementation

@override
Future<UpdateUserAttributeResult> updateUserAttribute({
  UpdateUserAttributeRequest? request,
}) async {
  var userAttributeKey = request?.attribute.userAttributeKey;
  _checkUserAttributeKey(userAttributeKey);
  try {
    final Map<String, dynamic>? data =
        await _channel.invokeMapMethod<String, dynamic>(
      'updateUserAttribute',
      <String, dynamic>{
        'data': request?.serializeAsMap(),
      },
    );
    if (data == null)
      throw AmplifyException(
          AmplifyExceptionMessages.nullReturnedFromMethodChannel);
    return _formatUpdateUserAttributeResponse(data);
  } on PlatformException catch (e) {
    throw castAndReturnPlatformException(e);
  }
}