isCloudRun function

bool isCloudRun([
  1. Map<String, String>? environment
])

Whether the current process appears to be running on Cloud Run.

Implementation

bool isCloudRun([Map<String, String>? environment]) {
  final Map<String, String> env = environment ?? Platform.environment;
  return (env[cloudRunServiceEnv] ?? '').isNotEmpty;
}