flutter/packages/flutter_tools/lib/src/web/workflow.dart
Danny Tuppeny 7e73cd74b1
Fix visibility of web server device when Chrome is not available (#40757)
* Fix visbility of web server device when Chrome is not available

* Add tests

* Update workflow test

* Fix tests to not rely on Chrome being on the underlying machine
2019-09-30 14:45:30 +01:00

28 lines
767 B
Dart

// Copyright 2019 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 '../base/context.dart';
import '../base/platform.dart';
import '../doctor.dart';
import '../features.dart';
/// The web workflow instance.
WebWorkflow get webWorkflow => context.get<WebWorkflow>();
class WebWorkflow extends Workflow {
const WebWorkflow();
@override
bool get appliesToHostPlatform => featureFlags.isWebEnabled && (platform.isWindows || platform.isMacOS || platform.isLinux);
@override
bool get canLaunchDevices => featureFlags.isWebEnabled;
@override
bool get canListDevices => featureFlags.isWebEnabled;
@override
bool get canListEmulators => false;
}