CaptionSlide.fromText constructor

const CaptionSlide.fromText({
  1. required String caption,
  2. EdgeInsetsGeometry? padding,
  3. Widget? background,
  4. Key? key,
})

Creates a Caption slide with just using the string for caption. It uses Text with the TextTheme.headlineLarge style.

You can always use the defaut constructor of CaptionSlide for more customization.

Implementation

const CaptionSlide.fromText({
  required String caption,
  EdgeInsetsGeometry? padding,
  Widget? background,
  super.key,
})  : _background = background,
      caption = null,
      _captionText = caption,
      _padding = padding;