Environment variables with type safety. Empty strings are treated as null values.
- Add environment fields to env_fields.dart.
- Customize flavors in env_flavor.dart, adding or removing flavors to fit the app's needs.
- Implement environment fields for each flavor
- For the app to build without an
.env
file for each flavor, assign a default value all fields.
- For the app to build without an
const String url = Env.baseUrl ?? 'https://example.com';
const String? urlNullable = Env.baseUrl;
const String urlEmpty = Env.raw.baseUrl;