Download flutter/packages/flutter_tools/lib/src/commands/generate.dart from luom2645/agent-workspace: direct link, hf CLI and curl.
- Browser
- Download file 897 Bytes
-
https://huggingface.co/luom2645/agent-workspace/resolve/7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/packages/flutter_tools/lib/src/commands/generate.dart
- Command line
-
hf download hf://luom2645/agent-workspace@7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/packages/flutter_tools/lib/src/commands/generate.dart
-
curl -L -o generate.dart https://huggingface.co/luom2645/agent-workspace/resolve/7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/packages/flutter_tools/lib/src/commands/generate.dart
897 Bytes
| // 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. | |
| import '../globals.dart' as globals; | |
| import '../runner/flutter_command.dart'; | |
| class GenerateCommand extends FlutterCommand { | |
| GenerateCommand() { | |
| usesTargetOption(); | |
| } | |
| String get description => 'run code generators.'; | |
| String get name => 'generate'; | |
| bool get hidden => true; | |
| 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(); | |
| } | |
| } | |