run method

  1. @override
void run()
override

Runs this command.

The return value is wrapped in a Future if necessary and returned by CommandRunner.runCommand.

Implementation

@override
void run() {
  final time = Stopwatch();
  time.start();
  switch (argResults!['type'].toString()) {
    case 'simple':
      generateSimple(argResults!);
      break;
    case 'getx':
      generateGetX(argResults!);
      break;
    default:
      LogService.error('Invalid Arguments');
      break;
  }
  time.stop();
  LogService.info('Time Taken: ${time.elapsed.inMilliseconds} milliseconds');
  LogService.success('Feature ${argResults!['name']} created successfully');
}