BoltSlidesViewer constructor

const BoltSlidesViewer({
  1. Key? key,
  2. String? filePath,
  3. String? url,
  4. String? googleSlidesId,
  5. required SlidesSourceType sourceType,
  6. bool enableNavigation = true,
  7. bool showSlideCounter = true,
  8. bool showToolbar = true,
  9. bool enableInteractions = true,
  10. int initialSlide = 1,
  11. Color? loadingColor,
  12. String? title,
  13. List<Widget>? toolbarActions,
  14. Widget? loadingWidget,
  15. Widget? errorWidget,
  16. Color? backgroundColor,
  17. dynamic onSlideChanged(
    1. int
    )?,
  18. dynamic onError(
    1. dynamic
    )?,
  19. bool isModal = false,
  20. bool presentationMode = false,
  21. bool convertToPdf = true,
})

Implementation

const BoltSlidesViewer({
  super.key,
  this.filePath,
  this.url,
  this.googleSlidesId,
  required this.sourceType,
  this.enableNavigation = true,
  this.showSlideCounter = true,
  this.showToolbar = true,
  this.enableInteractions = true,
  this.initialSlide = 1,
  this.loadingColor,
  this.title,
  this.toolbarActions,
  this.loadingWidget,
  this.errorWidget,
  this.backgroundColor,
  this.onSlideChanged,
  this.onError,
  this.isModal = false,
  this.presentationMode = false,
  this.convertToPdf = true,
}) : assert(
        (sourceType == SlidesSourceType.file && filePath != null) ||
            (sourceType == SlidesSourceType.network && url != null) ||
            (sourceType == SlidesSourceType.googleSlides &&
                googleSlidesId != null) ||
            (sourceType == SlidesSourceType.pptx &&
                (filePath != null || url != null)) ||
            (sourceType == SlidesSourceType.pdf &&
                (filePath != null || url != null)),
        'Must provide appropriate path/url based on source type',
      );