preview function

dynamic preview(
  1. BuildContext context,
  2. List images, {
  3. int? index,
})

Implementation

preview(BuildContext context, List images, {int? index}) {
  showModalBottomSheet(
    context: context,
    isScrollControlled: true,
    backgroundColor: BilionsColors.dark,
    builder: (context) {
      return FractionallySizedBox(
        heightFactor: 1,
        child: ImagePreviewModal(images, index: index),
      );
    },
  );
}