commands property

  1. @override
Iterable<ConsoleCommand> get commands
override

Implementation

@override
Iterable<ConsoleCommand> get commands => [
  ...super.commands,
  ConsoleCommand(
    name: 'status',
    category: 'Server',
    maxArgs: 0,
    description: 'Show server status and uptime.',
    parser: ArgParser()
      ..addFlag(
        'json',
        negatable: false,
        help: "Print machine-readable JSON.",
      ),
    examples: ['status', 'status --json'],
    run: (context) => printServerStatus(server, context),
  ),
];