isPublic static method

bool isPublic(
  1. String key
)

Checks whether key is designated as client-public.

The check is an exact prefix match: key must begin with publicPrefix ('BLOOM_PUBLIC_'). Variables that merely contain this substring elsewhere in their name are not public.

BloomEnv.isPublic('BLOOM_PUBLIC_API_URL'); // true
BloomEnv.isPublic('DATABASE_PASSWORD');    // false
BloomEnv.isPublic('NOT_BLOOM_PUBLIC_KEY'); // false

Implementation

static bool isPublic(String key) => key.startsWith(publicPrefix);