isVisible property

bool get isVisible
inherited

Effective visibility: baseline JSON + runtime overlays, ANDed with the element's targetWidth match against the current card width bucket.

isVisible and targetWidth are independent gates — a runtime setIsVisible(visible: true) overlay cannot override a targetWidth miss.

Implementation

bool get isVisible {
  final resolved = ref.watch(resolvedElementProvider(id));
  final baselineVisible = parseIsVisible(resolved?['isVisible']);
  final bucket = ref.watch(cardWidthBucketProvider);
  final matchesWidth = targetWidthMatches(
    resolved?['targetWidth'] as String?,
    bucket,
  );
  return baselineVisible && matchesWidth;
}