nativescript-photoviewer
nativescript-photoviewer copied to clipboard
TypeError: Cannot read property 'DarkVibrant' of undefined
Hello, I'm using nativescript-vue here is my code
import { PhotoViewer, PhotoViewerOptions, PaletteType, NYTPhotoItem } from "nativescript-photoviewer";
try{
let images = args.object.images.split(',');
let photoviewerOptions = {
startIndex: 0,
android: {
paletteType: PaletteType.DarkVibrant,
showAlbum: false
}
};
photoViewer.showGallery(myImages, photoviewerOptions);
}
catch(e){
console.log(e);
}
also try using
const PhotoViewer = require('nativescript-photoviewer').PhotoViewer;
const PhotoViewerOptions = require('nativescript-photoviewer').PhotoViewerOptions;
const PaletteType = require('nativescript-photoviewer').PaletteType;
const NYTPhotoItem = require('nativescript-photoviewer').NYTPhotoItem;
Error: TypeError: Cannot read property 'DarkVibrant' of undefined
Seems it cannot read the enum types. Not sure is the enums must be defined in a special way for Vue.
I even try using plain javascript still I was getting the same error