warnLegacyOnce function

void warnLegacyOnce(
  1. String key,
  2. String message
)

Emits a compatibility warning once per legacy wire shape.

This intentionally remains separate from debug logging because callers need to see migration guidance before the compatibility path is removed.

Implementation

void warnLegacyOnce(String key, String message) {
  if (!_emittedLegacyWarnings.add(key)) {
    return;
  }

  debugPrint('[flutter_inapp_purchase] DEPRECATED: $message');
}