generate method
Generates the module files described by the provided context.
Existing module files are preserved unless overwrite is true.
Returns whether module generation was performed successfully.
Implementation
Future<bool> generate(
ModuleContext context, {
bool overwrite = false,
}) async {
if (!overwrite && await _moduleExists(context)) {
overwrite =
await confirmOverwrite('${context.module.displayName} module');
if (!overwrite) return false;
}
await _generateFiles(context, overwrite: overwrite);
return true;
}