2025-11-30 11:46:59 -06:00
|
|
|
import "package:args/command_runner.dart";
|
|
|
|
|
|
|
|
|
|
class Day1Command extends Command {
|
|
|
|
|
// The [name] and [description] properties must be defined by every
|
|
|
|
|
// subclass.
|
2025-11-30 12:02:28 -06:00
|
|
|
@override
|
2025-11-30 11:46:59 -06:00
|
|
|
final name = "day1";
|
2025-11-30 12:02:28 -06:00
|
|
|
|
|
|
|
|
@override
|
2025-11-30 11:46:59 -06:00
|
|
|
final description = "Run Advent of Code 2025 Day 1";
|
|
|
|
|
|
|
|
|
|
Day1Command() {
|
|
|
|
|
// we can add command specific arguments here.
|
|
|
|
|
// [argParser] is automatically created by the parent class.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// [run] may also return a Future.
|
|
|
|
|
@override
|
|
|
|
|
void run() {
|
|
|
|
|
// [argResults] is set before [run()] is called and contains the flags/options
|
|
|
|
|
// passed to this command.
|
|
|
|
|
print(argResults?.rest);
|
|
|
|
|
}
|
|
|
|
|
}
|