FirebaseConfig.fromMap constructor
Creates a FirebaseConfig from a map of configuration values.
This factory constructor is useful for creating configurations from YAML data or other map-based sources.
Parameters:
map: Map containing configuration valuesflavor: Map containing flavor-specific values for defaults
Implementation
factory FirebaseConfig.fromMap(
Map<dynamic, dynamic> map, Map<dynamic, dynamic> flavor) {
return FirebaseConfig(
projectId: map['project_id'] as String,
token: map['token'] as String?,
platform: map['platform'] as String?,
output: map['output'] as String?,
androidPackageName: map['android_package_name'] as String? ??
flavor['ANDROID_APPLICATION_ID'] as String? ??
'',
iosBundleId: map['ios_bundle_id'] as String? ??
flavor['IOS_APPLICATION_ID'] as String? ??
'',
webAppId: map['web_app_id'] as String?,
serviceAccount: map['service_account'] as String?,
enableCiUseServiceAccount: map['enable_ci_use_service_account'] is bool
? map['enable_ci_use_service_account'] as bool
: false,
overwrite: false, // This will be set from command line flag
);
}