openTextEditor method
void
openTextEditor()
Opens the text editor.
This method opens the text editor, allowing the user to add or edit text layers on the image.
Implementation
void openTextEditor() async {
TextLayerData? layer = await _openPage(
TextEditor(
key: textEditor,
configs: configs,
theme: _theme,
callbacks: callbacks,
),
duration: const Duration(milliseconds: 50),
);
if (layer == null || !mounted) return;
layer.offset = newLayerOffsetPosition;
addLayer(layer, blockSelectLayer: true);
_selectLayerAfterHeroIsDone(layer.id);
setState(() {});
mainEditorCallbacks?.handleUpdateUI();
}