run static method

Future<int> run(
  1. String flavor,
  2. String pathMorphemeYaml
)

Runs the Morpheme Firebase command for a specific flavor.

This method executes the Morpheme CLI Firebase command with the specified flavor and configuration file path. It's typically used to configure Firebase for different environments (dev, staging, prod).

Parameters:

  • flavor: The flavor/environment to configure (e.g., 'dev', 'staging', 'prod')
  • pathMorphemeYaml: Path to the morpheme.yaml configuration file

Returns: The exit code of the command execution

Example:

// Configure Firebase for development environment
final exitCode = await FirebaseHelper.run('dev', './morpheme.yaml');
if (exitCode == 0) {
  print('Firebase configured successfully for dev environment');
}

Implementation

static Future<int> run(String flavor, String pathMorphemeYaml) async {
  return 'morpheme firebase -f $flavor --morpheme-yaml "$pathMorphemeYaml"'
      .run;
}