SingleImageEditor constructor
const
SingleImageEditor({
- Key? key,
- required dynamic image,
- ImageEditorFeatures features = const ImageEditorFeatures(adjust: true, crop: true, blur: true, emoji: true, filters: true, flip: true, rotate: true, text: true),
- 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)], - required Size viewportSize,
- required bool darkTheme,
- required EditorBackground background,
The SingleImageEditor constructor requires the image
, viewportSize
, darkTheme
, and background
parameters.
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});