npm install @nstudio/nativescript-qr
Component / Module:
import { Image } from "@nativescript/core";
import { Qr } from "@nstudio/nativescript-qr";
export class YourComponent{
...
onImageLoaded(args) {
const image = args.object as Image;
const result = Qr.generate('Hello World');
image.imageSource = result;
}
...
}
View:
<Image src="" (loaded)="onImageLoaded($event)"></Image>
Apache License Version 2.0