getEssentialTrafficOnlyReason function

String? getEssentialTrafficOnlyReason()

Returns the env var name responsible for the current essential-traffic restriction, or null if unrestricted. Used for user-facing "unset X to re-enable" messages.

Implementation

String? getEssentialTrafficOnlyReason() {
  if (Platform.environment.containsKey(
    'MAGE_DISABLE_NONESSENTIAL_TRAFFIC',
  )) {
    return 'MAGE_DISABLE_NONESSENTIAL_TRAFFIC';
  }
  return null;
}