minor update to flutter daemon
This commit is contained in:
@@ -26,20 +26,19 @@ const String protocolVersion = '0.1.0';
|
||||
/// It can be shutdown with a `daemon.shutdown` command (or by killing the
|
||||
/// process).
|
||||
class DaemonCommand extends FlutterCommand {
|
||||
DaemonCommand({ bool hideCommand: false }) : _hideCommand = hideCommand;
|
||||
DaemonCommand({ this.hidden: false });
|
||||
|
||||
@override
|
||||
final String name = 'daemon';
|
||||
|
||||
@override
|
||||
final String description = 'Run a persistent, JSON-RPC based server to communicate with devices.';
|
||||
final bool _hideCommand;
|
||||
|
||||
@override
|
||||
bool get requiresProjectRoot => false;
|
||||
|
||||
@override
|
||||
bool get hidden => _hideCommand;
|
||||
final bool hidden;
|
||||
|
||||
@override
|
||||
Future<int> runInProject() {
|
||||
@@ -391,8 +390,7 @@ Map<String, dynamic> _deviceToMap(Device device) {
|
||||
return <String, dynamic>{
|
||||
'id': device.id,
|
||||
'name': device.name,
|
||||
'platform': _enumToString(device.platform),
|
||||
'available': true
|
||||
'platform': _enumToString(device.platform)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,11 @@ class RunMojoCommand extends FlutterCommand {
|
||||
|
||||
@override
|
||||
final String description = 'Run a Flutter app in mojo (from github.com/domokit/mojo).';
|
||||
final bool _hideCommand;
|
||||
|
||||
RunMojoCommand({ bool hideCommand: false }) : _hideCommand = hideCommand {
|
||||
@override
|
||||
final bool hidden;
|
||||
|
||||
RunMojoCommand({ this.hidden: false }) {
|
||||
argParser.addFlag('android', negatable: false, help: 'Run on an Android device');
|
||||
argParser.addFlag('checked', negatable: false, help: 'Run Flutter in checked mode');
|
||||
argParser.addFlag('mojo-debug', negatable: false, help: 'Use Debug build of mojo');
|
||||
@@ -43,9 +45,6 @@ class RunMojoCommand extends FlutterCommand {
|
||||
@override
|
||||
bool get requiresProjectRoot => false;
|
||||
|
||||
@override
|
||||
bool get hidden => _hideCommand;
|
||||
|
||||
// TODO(abarth): Why not use path.absolute?
|
||||
String _makePathAbsolute(String relativePath) {
|
||||
File file = new File(relativePath);
|
||||
|
||||
@@ -24,7 +24,7 @@ Future<int> _runPub(Directory directory, { bool upgrade: false }) async {
|
||||
}
|
||||
|
||||
class UpdatePackagesCommand extends FlutterCommand {
|
||||
UpdatePackagesCommand({ bool hideCommand: false }) : _hideCommand = hideCommand {
|
||||
UpdatePackagesCommand({ this.hidden: false }) {
|
||||
argParser.addFlag(
|
||||
'upgrade',
|
||||
help: 'Run "pub upgrade" rather than "pub get".',
|
||||
@@ -39,8 +39,7 @@ class UpdatePackagesCommand extends FlutterCommand {
|
||||
final String description = 'Update the packages inside the Flutter repo.';
|
||||
|
||||
@override
|
||||
bool get hidden => _hideCommand;
|
||||
final bool _hideCommand;
|
||||
final bool hidden;
|
||||
|
||||
@override
|
||||
bool get requiresProjectRoot => false;
|
||||
|
||||
Reference in New Issue
Block a user