controller function
Implementation
FutureOr controller(List<String> args) async {
List<String> names = args.sublist(1);
if (names.isEmpty) {
return;
}
String directory = absolute('lib/controller');
Directory dir = Directory(directory);
if (!dir.existsSync()) {
dir.createSync();
}
RegExp alpha = RegExp(r'^[a-zA-Z]+$');
for (String name in names) {
if (alpha.hasMatch(name)) {
_createController(name.toLowerCase(), directory);
}
}
}