| // Copyright 2016 The Chromium 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'; |
| import '../runner/flutter_command.dart'; |
| class PrecacheCommand extends FlutterCommand { |
| argParser.addFlag('all-platforms', abbr: 'a', negatable: false, |
| help: 'Precache artifacts for all platforms.'); |
| final String name = 'precache'; |
| final String description = 'Populates the Flutter tool\'s cache of binary artifacts.'; |
| Future<Null> runCommand() async { |
| if (argResults['all-platforms']) |
| cache.includeAllPlatforms = true; |
| printStatus('Already up-to-date.'); |