displayPresentation method

Future<List<Widget>> displayPresentation(
  1. Presentation presentation
)

Function for displaying the presentations

Implementation

Future<List<Widget>> displayPresentation(Presentation presentation) async {
  List<Widget> tempList = [];
  List<Widget> slideWidgets = [];
  for (int i = 0; i < presentation.slides.length; i++) {
    List<Widget> tempSlideWidget = await compute(getSlideDetails, GetSlideParam(presentation.slides[i], presentation.width, presentation.height));
    slideWidgets.addAll(tempSlideWidget);
  }
  tempList.add(Container(
    color: Colors.grey,
    width: 500,
    margin: const EdgeInsets.all(8),
    child: Column(
      children: slideWidgets,
    ),
  ));
  return tempList;
}