done method
void
done()
Handles the "Done" action, either by applying changes or closing the editor.
Implementation
void done() async {
if (_createScreenshot) return;
if (initConfigs.convertToUint8List) {
_createScreenshot = true;
LoadingDialog loading = LoadingDialog()
..show(
context,
i18n: i18n,
theme: theme,
designMode: designMode,
message: i18n.blurEditor.applyBlurDialogMsg,
imageEditorTheme: imageEditorTheme,
);
var data = await screenshotController.capture();
_createScreenshot = false;
if (mounted) {
loading.hide(context);
Navigator.pop(context, data);
}
} else {
Navigator.pop(context, selectedBlur);
}
}