HybridImage.file constructor

HybridImage.file(
  1. File file, {
  2. Key? key,
  3. double? width,
  4. double? height,
  5. BoxFit fit = BoxFit.contain,
  6. AlignmentGeometry alignment = Alignment.center,
})

Factory for HybridImage that returns a widget with a file image for both svg and other image types. file is required.

Implementation

factory HybridImage.file(
  File file, {
  Key? key,
  double? width,
  double? height,
  BoxFit fit = BoxFit.contain,
  AlignmentGeometry alignment = Alignment.center,
}) =>
    HybridImage._(
      key: key,
      type: HybridImageType.file,
      file: file,
      width: width,
      height: height,
      fit: fit,
      alignment: alignment,
    );