validate method
void
validate()
Implementation
void validate() {
if (app != null) {
return;
}
final configuredFlavors = 'Configured Flavors:'
'\n\t- ${apps.map((e) => e.appAnnotation.flavor).join('\n\t- ')}';
if (context.flavor case final flavor? when flavor.isNotEmpty) {
throw Exception(
'No app found for flavor "$flavor"\n$configuredFlavors',
);
}
if (context.flavor == null) {
throw Exception(
'No app found, did you forget pass the '
'--flavor arg?\n$configuredFlavors',
);
}
throw Exception(
[
'No app found',
'Flavor: ${context.flavor}',
configuredFlavors,
].join('\n'),
);
}