openTextEditor method
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({
/// Small Duration is important for a smooth hero animation
Duration duration = const Duration(milliseconds: 150),
}) async {
TextLayerData? layer = await openPage(
TextEditor(
key: textEditor,
configs: configs,
theme: _theme,
callbacks: callbacks,
),
duration: duration,
);
if (layer == null || !mounted) return;
addLayer(layer, blockSelectLayer: true);
_selectLayerAfterHeroIsDone(layer.id);
setState(() {});
mainEditorCallbacks?.handleUpdateUI();
}