EditorConfig constructor
EditorConfig({
- double maxScale = 5.0,
- EdgeInsets cropRectPadding = const EdgeInsets.all(20.0),
- Size cornerSize = const Size(30.0, 5.0),
- Color? cornerColor,
- Color? lineColor,
- double lineHeight = 0.6,
- EditorMaskColorHandler? editorMaskColorHandler,
- double hitTestSize = 20.0,
- Duration animationDuration = const Duration(milliseconds: 200),
- Duration tickerDuration = const Duration(milliseconds: 400),
- double? cropAspectRatio = CropAspectRatios.custom,
- double? initialCropAspectRatio = CropAspectRatios.custom,
- InitCropRectType initCropRectType = InitCropRectType.imageRect,
- EditorCropLayerPainter cropLayerPainter = const EditorCropLayerPainter(),
- double speed = 1.0,
- HitTestBehavior hitTestBehavior = HitTestBehavior.deferToChild,
- EditActionDetailsIsChanged? editActionDetailsIsChanged,
- bool reverseMousePointerScrollDirection = false,
Implementation
EditorConfig({
this.maxScale = 5.0,
this.cropRectPadding = const EdgeInsets.all(20.0),
this.cornerSize = const Size(30.0, 5.0),
this.cornerColor,
this.lineColor,
this.lineHeight = 0.6,
this.editorMaskColorHandler,
this.hitTestSize = 20.0,
this.animationDuration = const Duration(milliseconds: 200),
this.tickerDuration = const Duration(milliseconds: 400),
this.cropAspectRatio = CropAspectRatios.custom,
this.initialCropAspectRatio = CropAspectRatios.custom,
this.initCropRectType = InitCropRectType.imageRect,
this.cropLayerPainter = const EditorCropLayerPainter(),
this.speed = 1.0,
this.hitTestBehavior = HitTestBehavior.deferToChild,
this.editActionDetailsIsChanged,
this.reverseMousePointerScrollDirection = false,
}) : assert(lineHeight > 0.0),
assert(hitTestSize >= 0.0),
assert(maxScale > 0.0),
assert(speed > 0.0);