BoltSlidesViewer constructor
const
BoltSlidesViewer({
- Key? key,
- String? filePath,
- String? url,
- String? googleSlidesId,
- required SlidesSourceType sourceType,
- bool showSlideCounter = true,
- bool showToolbar = true,
- bool enableInteractions = true,
- int initialSlide = 1,
- Color? loadingColor,
- String? title,
- List<
Widget> ? toolbarActions, - Widget? loadingWidget,
- Widget? errorWidget,
- Color? backgroundColor,
- dynamic onSlideChanged()?,
- dynamic onError(
- dynamic
- bool isModal = false,
- bool presentationMode = false,
- 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',
);