flutter_environment_config 1.0.0
flutter_environment_config: ^1.0.0 copied to clipboard
Plugin that exposes environment variables to your Dart code in Flutter as well as to your native code in iOS and Android. Bring some 12 factor love to your Flutter apps.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
2.1.0 - 2025-11-02 #
๐ Major Features Added #
- ๐ Type-Safe Code Generation: Automatic generation of type-safe getters with intelligent type inference
- ๐ Recursive File Scanning: Automatically discovers
.envfiles in subdirectories - ๐ฆ Multi-Package Support: Seamless integration with complex project structures and monorepos
- ๐ Cross-Platform Generator: Full support for Windows, macOS, and Linux development environments
- ๐จ Enhanced CLI: Beautiful colored terminal output with detailed progress information
๐ ๏ธ Generator Features #
- โจ Automatic Type Detection: Infers
String,bool,int,doubletypes from environment values - ๐ Smart Project Detection: Automatically finds configuration from sub-packages
- ๐ Multiple Dependency Sources: Supports path, git, and hosted package dependencies
- ๐ฏ Custom Output Directories: Configurable output locations via
pubspec.yaml - ๐ Detailed Reporting: Shows discovered files, generated variables, and output locations
๐ Cross-Platform Improvements #
- ๐ฅ๏ธ Windows Support: Uses
%LOCALAPPDATA%\Pub\Cacheor%APPDATA%\Pub\Cache - ๐ macOS Support: Uses
~/.pub-cachewith proper HOME detection - ๐ง Linux Support: Full compatibility with Linux development environments
- ๐ง PUB_CACHE Detection: Respects custom
PUB_CACHEenvironment variable
๐ CLI Commands #
dart run flutter_environment_config:generate- Generate type-safe code- Automatic detection of generator location across all dependency types
- Intelligent fallback to pub cache when local paths not available
๐จ Developer Experience #
- ๐ Colored Output: Cyan, blue, yellow, magenta terminal colors for better readability
- ๐ Progress Tracking: Real-time feedback on file discovery and code generation
- ๐ Debug Information: Detailed logging for troubleshooting
- โ Success Indicators: Clear completion messages with file locations
๐ Documentation Updates #
- ๐ Comprehensive README: Updated with all new features and examples
- ๐ ๏ธ Setup Guides: Enhanced installation and configuration instructions
- ๐งช Testing Examples: Updated testing patterns with generated code
- ๐ง Configuration Reference: Complete pubspec.yaml configuration options
2.0.0 - 2025-10-26 #
Breaking Changes #
- ๐ฅ PROJECT RENAMED: Changed project name from
flutter_environment_configtoflutter_environment_config - ๐ฅ CLASS RENAMED: Changed class name from
FlutterEnvironmentConfigtoFlutterEnvironmentConfig - ๐ฅ IMPORT UPDATED: Import path changed to
package:flutter_environment_config/flutter_environment_config.dart
Added #
- ๐ Complete rewrite with improved API design
- ๐ฑ Enhanced native platform support for iOS and Android
- ๐งช Better testing utilities with
loadValueForTesting - ๐ Comprehensive documentation and setup guides
- โจ Support for multiple environment files (.env.development, .env.staging, etc.)
- ๐ง Improved error handling and validation
- ๐ฏ Better TypeScript-like null safety support
Changed #
- ๐ฅ BREAKING: Updated minimum Flutter version to 1.10.0
- ๐ฅ BREAKING: Updated minimum Dart SDK to 2.12.0 (null safety)
- ๐ Refactored core plugin architecture for better performance
- ๐ Completely rewritten README with better examples
- ๐จ Improved API consistency across platforms
Fixed #
- ๐ Fixed null value handling issues
- ๐ง Resolved Android build configuration problems
- ๐ฑ Fixed iOS integration issues
- โก Improved plugin initialization performance
Security #
- ๐ Added security warnings about sensitive data storage
- ๐ Enhanced documentation about best practices