Image Slide
To create an image slide, use the FlutterDeckSlide.image
constructor. It is responsible for rendering the default header and footer of the slide deck, and rendering the image using the provided imageBuilder
.
class ImageSlide extends FlutterDeckSlideWidget {
const ImageSlide()
: super(
configuration: const FlutterDeckSlideConfiguration(
route: '/image-slide',
header: FlutterDeckHeaderConfiguration(
title: 'Image slide template',
),
),
);
@override
Widget build(BuildContext context) {
return FlutterDeckSlide.image(
imageBuilder: (context) => Image.asset('assets/image.png'),
label: 'Here goes the label of the image (optional)',
);
}
}