workflow.dart 905 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 6
import 'package:meta/meta.dart';

7
import '../base/platform.dart';
8
import '../doctor.dart';
9
import '../features.dart';
10 11

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

  final Platform _platform;
  final FeatureFlags _featureFlags;
20 21

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

  @override
28
  bool get canLaunchDevices => _featureFlags.isWebEnabled;
29 30

  @override
31
  bool get canListDevices => _featureFlags.isWebEnabled;
32 33 34 35

  @override
  bool get canListEmulators => false;
}