Capacitor Camera CameraSource.Prompt not working

Hi everyone, jus a newbie here, i am trying to work on a project that needs photo uploading. i tried the camera plugin of capacitor , works fine except for the prompt.

here’s t the sample of the code i am using:

async takepicture(){

let options: CameraOptions = {

    quality: 100,

    source: CameraSource.Prompt,

    resultType: CameraResultType.Uri,

    allowEditing:true

};

await Camera.getPhoto(options).then(async (image)=>{

  if (image.webPath) {

    this.img = this.sanitizer.bypassSecurityTrustResourceUrl(image.webPath);

    this.imgblob = await fetch(image.webPath).then(r => r.blob());

    this.imgerror=false;

  }

});

}

I tried to update my capacitor to the latest version:

@capacitor/ios not installed
@capacitor/android 2.4.7
@capacitor/cli 2.4.7
@capacitor/core 2.4.7
@capacitor/electron not installed

i tested it on an android emulator

does anyone know the solution to this? thank you

UPDATE:

A really stupid mistake, was able to resolve it, i accidentally imported camera from capacitor like this:

import { Camera, CameraOptions, CameraResultType, CameraSource } from '@capacitor/core';

change it to this:

import {  CameraOptions, CameraResultType, CameraSource, Plugins } from '@capacitor/core';
const { Camera } = Plugins;

problem solve, a stupid mistake sorry.