discontinuedPackage jet_cad_floor_plan has been discontinued and replaced by jet_cad_2d_plan.

layerPickerBlocked function

String? layerPickerBlocked(
  1. DraftDocument doc,
  2. Iterable<SelectionKey> keys, [
  3. FloorPlanStrings strings = const FloorPlanStringsEn()
])

Why the picker is disabled for keys in doc, or null when it is enabled: a permission set without Capability.components (D11), or a plain group among the keys (D12). In strings' language (spec 14d); English by default, the constants above.

Implementation

String? layerPickerBlocked(DraftDocument doc, Iterable<SelectionKey> keys,
    [FloorPlanStrings strings = const FloorPlanStringsEn()]) {
  if (!doc.commands.permissions.allows(Capability.components)) {
    return strings.readOnlyDocument;
  }
  for (final k in keys) {
    final node = doc.tree[k.target];
    if (node is GroupNode && !isParametricObject(doc, k.target)) {
      return strings.plainGroupNoLayer;
    }
  }
  return null;
}