workflow.dart 879 Bytes
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5
import '../base/platform.dart';
6
import '../doctor_validator.dart';
7
import '../features.dart';
8 9

class WebWorkflow extends Workflow {
10
  const WebWorkflow({
11 12
    required Platform platform,
    required FeatureFlags featureFlags,
13 14 15 16 17
  }) : _platform = platform,
       _featureFlags = featureFlags;

  final Platform _platform;
  final FeatureFlags _featureFlags;
18 19

  @override
20 21 22 23
  bool get appliesToHostPlatform => _featureFlags.isWebEnabled &&
    (_platform.isWindows ||
       _platform.isMacOS ||
       _platform.isLinux);
24 25

  @override
26
  bool get canLaunchDevices => _featureFlags.isWebEnabled;
27 28

  @override
29
  bool get canListDevices => _featureFlags.isWebEnabled;
30 31 32 33

  @override
  bool get canListEmulators => false;
}