flavorFiles static method
The extra files a flavored project adds on top of the base architecture
files: the shared app_config.dart plus one entry point per flavor. Keyed
by path relative to the project root, matching the architecture maps.
configDir is the config folder relative to lib/ (per architecture).
storageImport is forwarded to each entry point (Clean only).
Implementation
static Map<String, String> flavorFiles({
required String name,
required String title,
required String configDir,
required List<String> flavors,
String? storageImport,
}) {
final configImport = '$configDir/app_config.dart';
final files = <String, String>{
'lib/$configDir/app_config.dart':
appConfig(title: title, flavors: flavors),
};
for (final flavor in flavors) {
files['lib/main_$flavor.dart'] = flavorEntryPoint(
name: name,
flavor: flavor,
configImport: configImport,
storageImport: storageImport,
);
}
return files;
}