flutter/packages/flutter_tools/lib/src/commands/generate.dart
Jonah Williams 74bd7b6f6d
[flutter_tools] opt all flutter tool libraries and tests out of null safety. (#74832)
* opt out the flutter tool

* oops EOF

* fix import

* Update tool_backend.dart

* Update daemon_client.dart

* fix more
2021-01-27 15:17:53 -08:00

34 lines
913 B
Dart

// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import '../globals.dart' as globals;
import '../runner/flutter_command.dart';
class GenerateCommand extends FlutterCommand {
GenerateCommand() {
usesTargetOption();
}
@override
String get description => 'run code generators.';
@override
String get name => 'generate';
@override
bool get hidden => true;
@override
Future<FlutterCommandResult> runCommand() async {
globals.printError(
'"flutter generate" is deprecated, use "dart pub run build_runner" instead. '
'The following dependencies must be added to dev_dependencies in pubspec.yaml:\n'
'build_runner: ^1.10.0\n'
'including all dependencies under the "builders" key'
);
return FlutterCommandResult.fail();
}
}