setExplicitLabelMode method

void setExplicitLabelMode(
  1. bool isLabel
)

Implementation

void setExplicitLabelMode(bool isLabel) {
  if (_elements.isEmpty) {
    _isExplicitLabelMode = isLabel;
    if (isLabel) {
      // Auto-insert LabelSetup when switching to label mode
      final setup = EditorElement(
        id: DateTime.now().microsecondsSinceEpoch.toString(),
        element: const KoiLabelSetupElement(widthMm: 40, heightMm: 30),
      );
      _elements = [setup];
    }
    notifyListeners();
  }
}