done method

void done()

Finishes editing in the painting editor and returns the painted items as a result. If no changes have been made, it closes the editor without returning any changes.

Implementation

void done() async {
  doneEditing(
      editorImage: widget.editorImage,
      onSetFakeHero: (bytes) {
        if (initConfigs.enableFakeHero) {
          setState(() {
            _fakeHeroBytes = bytes;
          });
        }
      },
      onCloseWithValue: () {
        if (!canUndo) return Navigator.pop(context);
        Navigator.of(context).pop(
          _exportPaintedItems(editorBodySize),
        );
      });
  paintEditorCallbacks?.handleDone();
}