init method

void init({
  1. required Uint8List image,
  2. required ImageByteFormat imageByteFormat,
  3. required void callback(
    1. Uint8List,
    2. int,
    3. int
    ),
  4. required GlobalKey<FigureShapeViewState> painterKey,
  5. required GlobalKey<DrawingViewState> drawingKey,
})

initialize the controller after DynamicImageCrop build.

Implementation

void init({
  required Uint8List image,
  required ui.ImageByteFormat imageByteFormat,
  required void Function(Uint8List, int, int) callback,
  required GlobalKey<FigureShapeViewState> painterKey,
  required GlobalKey<DrawingViewState> drawingKey,
}) {
  imageNotifier.set(image, imageByteFormat: imageByteFormat);
  _callback = callback;
  _painterKey = painterKey;
  _drawingKey = drawingKey;
}