javascript_dg
v1.0.5
Published
A JavaScript bridge for interacting with Flutter handlers
Downloads
21
Readme
How to install
npm install javascript_dg
How to use
import {
requestCameraPermission,
capturePhotoBase64,
capturePhoto,
} from "javascript_dg";
const Camera: React.FC = () => {
return (
<div>
<h2>Camara</h2>
<button onClick={requestCameraPermission}>
Request Camera Permission
</button>
<SizeBox></SizeBox>
<button onClick={capturePhotoBase64}>Capture Photo Base64</button>
<button onClick={capturePhoto}>Capture Photo</button>
<SizeBox />
<img
id="photo"
src="https://web-bridge-react-app.netlify.app/1019372.png"
alt="Captured Photo"
style={{ width: 180 }}
/>
</div>
);
};
export default Camera;