ensureHasKey method

  1. @override
void ensureHasKey(
  1. InteractiveOverlayImage item
)
override

Implementation

@override
void ensureHasKey(InteractiveOverlayImage item) {
  // InteractiveOverlayImage usually guarantees a key at construction time,
  // but if we had a setter it would be here.
  // It's a data class so we can't mutate it to add a key if missing.
  // Assuming valid input for now or throwing.
  if (item.key == null) throw ArgumentError('Overlay must have a key');
}