gotPreview method

dynamic gotPreview(
  1. List<ImageModulModel> imageSelected,
  2. FileType filetype, {
  3. bool? isGallery,
  4. bool? isNew,
  5. bool? isOwn,
  6. dynamic onCallNot()?,
})

Implementation

gotPreview(List<ImageModulModel> imageSelected, FileType filetype,
    {bool? isGallery, bool? isNew, bool? isOwn, Function()? onCallNot}) {
  SellonRouter.push(
      context,
      PreviewImage(
        imageSelected: imageSelected,
        // maxPick: widget.maxPick ?? 1,
      )).then((value) async {
    if (value != null) {
      if (value is bool) {
        if (onCallNot != null) {
          onCallNot.call();
        }
        if (isOwn != null) {
          // openGaleryOnw();
        } else {
          if (isNew != null) {
            // openGalerryNew(filetype);
            openGaleryWKWKImagePicker(filetype == FileType.image
                ? CameraPick.photo
                : CameraPick.video);
          } else {
            // openGalleryPhoto();
          }
        }
      } else {
        widget.backGalery!(value);
        // });
      }
    }
  });
}