PreRun defines what code should be ran before the command is executed. Consider using this to set things up before the command is run.
void preRun(List<String> args, Map<String, dynamic> flags) {}