TiffImageView.source constructor

const TiffImageView.source({
  1. Key? key,
  2. required TiffAsyncByteSource source,
  3. int pageIndex = 0,
  4. TiffAsyncByteSource? pyramidLevelsSource,
  5. void setUpIsolate()?,
  6. TransformationController? controller,
  7. TiffImageViewStart initialView = TiffImageViewStart.fit,
  8. double maxScale = 40,
  9. double maxUpsample = 1.3,
  10. double brightness = 0,
  11. double contrast = 1,
  12. double gamma = 1,
  13. int cacheBytes = 256 * 1024 * 1024,
  14. int? workerCount,
  15. bool showMinimap = true,
  16. bool showLoadingIndicator = true,
  17. Color backgroundColor = const Color(0xFFE0E0E0),
  18. ValueChanged<Object>? onError,
})

Shows page pageIndex of the file source reads, decoded on the current isolate and loaded piece by piece — works on every platform, including the web (see the class doc comment).

Implementation

const TiffImageView.source({
  super.key,
  required TiffAsyncByteSource this.source,
  this.pageIndex = 0,
  this.pyramidLevelsSource,
  this.setUpIsolate,
  this.controller,
  this.initialView = TiffImageViewStart.fit,
  this.maxScale = 40,
  this.maxUpsample = 1.3,
  this.brightness = 0,
  this.contrast = 1,
  this.gamma = 1,
  this.cacheBytes = 256 * 1024 * 1024,
  this.workerCount,
  this.showMinimap = true,
  this.showLoadingIndicator = true,
  this.backgroundColor = const Color(0xFFE0E0E0),
  this.onError,
}) : filePath = null,
     pyramidLevelsPath = null,
     assert(gamma > 0),
     assert(maxUpsample >= 1),
     assert(cacheBytes > 0),
     assert(workerCount == null || workerCount > 0);