Reland: use flutter features for web and desktop (#36699)

This commit is contained in:
Jonah Williams
2019-07-22 15:34:03 -07:00
committed by GitHub
parent 295530dcaf
commit 3fedb8cb5a
38 changed files with 505 additions and 376 deletions

View File

@@ -4,8 +4,8 @@
import '../base/context.dart';
import '../base/platform.dart';
import '../desktop.dart';
import '../doctor.dart';
import '../features.dart';
/// The [WindowsWorkflow] instance.
LinuxWorkflow get linuxWorkflow => context.get<LinuxWorkflow>();
@@ -18,13 +18,13 @@ class LinuxWorkflow implements Workflow {
const LinuxWorkflow();
@override
bool get appliesToHostPlatform => platform.isLinux;
bool get appliesToHostPlatform => platform.isLinux && featureFlags.isLinuxEnabled;
@override
bool get canLaunchDevices => platform.isLinux && flutterDesktopEnabled;
bool get canLaunchDevices => platform.isLinux && featureFlags.isLinuxEnabled;
@override
bool get canListDevices => platform.isLinux && flutterDesktopEnabled;
bool get canListDevices => platform.isLinux && featureFlags.isLinuxEnabled;
@override
bool get canListEmulators => false;