Files
packages.dart/deprecated/flutter_cli/lib/src/command_runner.dart
T
2026-01-15 14:38:46 -08:00

36 lines
953 B
Dart

// Copyright 2017 Google Inc.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
import 'dart:async';
import 'package:args/command_runner.dart';
import 'app_logger.dart';
import 'commands/generate.dart';
import 'commands/new.dart';
class NgDartCommanderRunner extends CommandRunner {
static const _verboseOption = 'verbose';
NgDartCommanderRunner()
: super('ngflutter', 'Ngflutter is a command line interface for Flutter.') {
argParser.addFlag(_verboseOption,
abbr: 'v',
help: 'Output extra logging information.',
defaultsTo: false);
addCommand(new NewProjectCommand());
addCommand(new GenerateCommand());
}
Future run(Iterable<String> args) async {
var option = super.parse(args);
AppLogger.log.isVerbose = option[_verboseOption];
await runCommand(option);
}
}