SingleImageEditor constructor

const SingleImageEditor({
  1. Key? key,
  2. required dynamic image,
  3. ImageEditorFeatures features = const ImageEditorFeatures(adjust: true, crop: true, blur: true, emoji: true, filters: true, flip: true, rotate: true, text: true),
  4. List<AspectRatioOption> cropAvailableRatios = const [AspectRatioOption(title: 'Freeform'), AspectRatioOption(title: '1:1', ratio: 1), AspectRatioOption(title: '4:3', ratio: 4 / 3), AspectRatioOption(title: '5:4', ratio: 5 / 4), AspectRatioOption(title: '7:5', ratio: 7 / 5), AspectRatioOption(title: '16:9', ratio: 16 / 9)],
  5. required Size viewportSize,
  6. required bool darkTheme,
  7. required EditorBackground background,
})

Implementation

const SingleImageEditor(
    {super.key,
    required this.image,
    this.features = const ImageEditorFeatures(
      adjust: true,
      crop: true,
      blur: true,
      emoji: true,
      filters: true,
      flip: true,
      rotate: true,
      text: true,
    ),
    this.cropAvailableRatios = const [
      AspectRatioOption(title: 'Freeform'),
      AspectRatioOption(title: '1:1', ratio: 1),
      AspectRatioOption(title: '4:3', ratio: 4 / 3),
      AspectRatioOption(title: '5:4', ratio: 5 / 4),
      AspectRatioOption(title: '7:5', ratio: 7 / 5),
      AspectRatioOption(title: '16:9', ratio: 16 / 9),
    ],
    required this.viewportSize,
    required this.darkTheme,
    required this.background});