Use FlutterFeatures to configure web and desktop devices (#36465)

This commit is contained in:
Jonah Williams
2019-07-21 18:21:15 -07:00
committed by GitHub
parent bffbad5c8a
commit bd52a78c71
37 changed files with 505 additions and 371 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;