The Environment Inspector lets you view and validate environment config in your Flutter app — required-variable checks, type detection, per-variable status badges, and a 0–100% health score.
The React Native build of this tool, running here on mock data. The Flutter port ships the same panels — walk the tour, or skip it and start tapping.
Not a video — this is the shipped tool on a mock build. Every EXPO_PUBLIC_ var the binary actually resolved streams in: auto-discovered, auto-typed, zero config.
flutter pub add buoy_envFlutter has no enumerable process.env — --dart-define values are compile-time and can't be listed at runtime. So instead of auto-discovery, you hand Buoy the map explicitly:
import 'package:buoy_env/buoy_env.dart';
registerBuoyEnv(
vars: {
'API_URL': const String.fromEnvironment('API_URL'),
'ENVIRONMENT': const String.fromEnvironment('ENVIRONMENT'),
// ...any runtime config strings
},
requiredEnvVars: [
envVar('API_URL').withType('url').build(),
RequiredEnvVar.value('ENVIRONMENT', 'production'),
'FEATURE_FLAG', // existence check
],
);
import 'package:buoy_env/buoy_env.dart';
registerBuoyEnv(
vars: {
'API_URL': const String.fromEnvironment('API_URL'),
'ENVIRONMENT': const String.fromEnvironment('ENVIRONMENT'),
// ...any runtime config strings
},
requiredEnvVars: [
envVar('API_URL').withType('url').build(),
RequiredEnvVar.value('ENVIRONMENT', 'production'),
'FEATURE_FLAG', // existence check
],
);
envVar BuilderThe same fluent builder API as React Native:
envVar('API_KEY')
.withType('string') // Set expected type
.withValue('sk_test_123') // Or set expected value
.withDescription('API Key') // Add documentation
.build() // Finalize config
// Shorthand for just checking existence
envVar('API_KEY').exists()
envVar('API_KEY')
.withType('string') // Set expected type
.withValue('sk_test_123') // Or set expected value
.withDescription('API Key') // Add documentation
.build() // Finalize config
// Shorthand for just checking existence
envVar('API_KEY').exists()
// 'string' | 'number' | 'boolean' | 'array' | 'object' | 'url'
// 'string' | 'number' | 'boolean' | 'array' | 'object' | 'url'
registerBuoyEnv OptionsregisterBuoyEnv({
required Map<String, String?> vars, // hand-built map (no process.env)
List<Object /* String | RequiredEnvVar */>? requiredEnvVars,
});
registerBuoyEnv({
required Map<String, String?> vars, // hand-built map (no process.env)
List<Object /* String | RequiredEnvVar */>? requiredEnvVars,
});
Required entries can be a bare String (existence), RequiredEnvVar.value(...), or an envVar(...).build().
| Status | Description |
|---|---|
required_present | Required var is set and correct |
required_missing | Required var is not set |
required_wrong_value | Set but doesn't match expected value |
required_wrong_type | Set but wrong type |
optional_present | Optional var that is set |
Flutter has no enumerable process.env, and compile-time --dart-define values can't be listed at runtime — so you hand Buoy the map in registerBuoyEnv(vars: {...}). The inspector then shows the value each variable resolved to, with per-variable status badges and a 0–100% health score.
Yes — declare expectations with the envVar builder (withType, withValue, withDescription, or exists for a plain existence check). Supported types are string, number, boolean, array, object, and url, and anything missing or wrong is flagged.