EditorConfig constructor

EditorConfig({
  1. double maxScale = 5.0,
  2. EdgeInsets cropRectPadding = const EdgeInsets.all(20.0),
  3. Size cornerSize = const Size(30.0, 5.0),
  4. Color? cornerColor,
  5. Color? lineColor,
  6. double lineHeight = 0.6,
  7. EditorMaskColorHandler? editorMaskColorHandler,
  8. double hitTestSize = 20.0,
  9. Duration animationDuration = const Duration(milliseconds: 200),
  10. Duration tickerDuration = const Duration(milliseconds: 400),
  11. double? cropAspectRatio = CropAspectRatios.custom,
  12. double? initialCropAspectRatio = CropAspectRatios.custom,
  13. InitCropRectType initCropRectType = InitCropRectType.imageRect,
  14. EditorCropLayerPainter cropLayerPainter = const EditorCropLayerPainter(),
  15. double speed = 1.0,
  16. HitTestBehavior hitTestBehavior = HitTestBehavior.deferToChild,
  17. EditActionDetailsIsChanged? editActionDetailsIsChanged,
  18. 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);