flutter_env_manager 1.0.1 copy "flutter_env_manager: ^1.0.1" to clipboard
flutter_env_manager: ^1.0.1 copied to clipboard

A package for managing Flutter app environments and versions

Flutter Env Manager #

A Flutter package to manage environment configurations using YAML files. This package automatically generates a Dart class (AppEnvironment) based on the environment configuration defined in a environment.yaml file. It supports dynamic key-value pairs, making it easy to add custom variables for different environments.


Features #

  • Automatic YAML File Creation: If environment.yaml doesn't exist, the package creates it with default values.
  • Dynamic Class Generation: Generates a Dart class (AppEnvironment) with static variables for all key-value pairs in the selected environment.
  • Support for Multiple Environments: Define multiple environments (e.g., development, staging, production) in the YAML file.
  • Custom Variables: Add any number of custom variables to your environment configuration.
  • Pubspec Version Support: Reads the app version from pubspec.yaml and includes it in the generated AppEnvironment class.

Installation #

Add flutter_env_manager to your pubspec.yaml file:

dependencies:
  flutter_env_manager: ^1.0.0

Usage #

Run the package using the following command:

dart run flutter_env_manager

This will pick the environment from environment.yaml.

To specify an environment manually, run:

dart run flutter_env_manager development

This will use the development environment.

If using fvm, you can run:

fvm dart run flutter_env_manager

or

fvm dart run flutter_env_manager development

Developed by: #

Bhavesh Auodichya

Personal email - theoctacoder@gmail.com

Work email - bhavesa@fermion.in

Publisher's LinkedIn - Fermion Infotech

0
likes
0
points
117
downloads

Publisher

verified publishertheoctacoder.org

Weekly Downloads

A package for managing Flutter app environments and versions

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, logger, path, yaml

More

Packages that depend on flutter_env_manager