Preview constructor

Preview({
  1. double? height,
  2. int? currentImage,
  3. List<String>? imagesPath,
  4. PreviewController? controller,
})

Implementation

Preview({
  double? height,
  int? currentImage,
  List<String>? imagesPath,
  PreviewController? controller,
})  : assert(
          controller == null || (currentImage == null && imagesPath == null)),
      this.height = height ?? 250.0,
      this.controller = controller ??
          PreviewController(
            currentImage: currentImage ?? 0,
            filesPath: imagesPath ?? const [],
          );