run method
void
run()
Implementation
void run() async {
try {
switch (args[0]) {
case 'gen':
gen();
break;
case 'new':
newPage();
break;
default:
throw Exception();
}
} catch (e) {
print(
[
'Help:',
'* Generate routes:',
' dart run uloc gen',
'',
'* Generate routes with paths:',
' dart run uloc gen <target> <destination>',
'',
'* Generate new screen widget:',
' dart run uloc new <widget_name> <dir>',
'',
'',
'',
].join('\n'),
);
print(e);
exit(1);
}
}