showSlidesDialog static method

Future<void> showSlidesDialog({
  1. required BuildContext context,
  2. String? filePath,
  3. String? url,
  4. String? googleSlidesId,
  5. required SlidesSourceType sourceType,
  6. String? title,
  7. bool barrierDismissible = true,
  8. bool enableNavigation = true,
  9. bool enableInteractions = true,
  10. int initialSlide = 1,
})

Implementation

static Future<void> showSlidesDialog({
  required BuildContext context,
  String? filePath,
  String? url,
  String? googleSlidesId,
  required SlidesSourceType sourceType,
  String? title,
  bool barrierDismissible = true,
  bool enableNavigation = true,
  bool enableInteractions = true,
  int initialSlide = 1,
}) async {
  return showDialog(
    context: context,
    barrierDismissible: barrierDismissible,
    builder: (context) => Dialog(
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(16.r),
      ),
      child: ClipRRect(
        borderRadius: BorderRadius.circular(16.r),
        child: SizedBox(
          width: MediaQuery.of(context).size.width * 0.9,
          height: MediaQuery.of(context).size.height * 0.8,
          child: BoltSlidesViewer(
            filePath: filePath,
            url: url,
            googleSlidesId: googleSlidesId,
            sourceType: sourceType,
            title: title,
            enableNavigation: enableNavigation,
            enableInteractions: enableInteractions,
            isModal: true,
            initialSlide: initialSlide,
          ),
        ),
      ),
    ),
  );
}