remote_config_gen 0.0.1 copy "remote_config_gen: ^0.0.1" to clipboard
remote_config_gen: ^0.0.1 copied to clipboard

A tool to generate remote config classes from the remote config template

Remote Config Generator #

A tool to generate Dart classes from Firebase Remote Config templates for type safe and static typing. No more hardcoded values!

Usage #

  1. Add the dev_dependency
dev_dependencies:
  remote_config_gen: 0.0.1
  1. Download/Fetch the remoteconfig.template.json for your project

    firebase remoteconfig:get -o remoteconfig.template.json
    
  2. Create a remote_config_gen.yaml file and define the configuration:

    input: remoteconfig.template.json
    output: lib/generated
    
  3. Run the generator

    dart run remote_config_gen
    
  4. Use the generated parameters:

    import 'package:remote_config_gen/remote_config_gen.dart';
    
    // It will return either the remote value or the default defined in the template
    int value = RemoteConfigParams.maxRetryCount.getValue();
    
    // It also accepts remote config groups
    bool isDark = RemoteConfigParams.uiSettings.darkMode.getValue();
    
3
likes
150
points
37
downloads

Publisher

verified publisherpibi.studio

Weekly Downloads

A tool to generate remote config classes from the remote config template

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

dart_style, path, yaml

More

Packages that depend on remote_config_gen