workflow.dart 795 Bytes
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4 5 6
// 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 '../doctor.dart';
7
import '../features.dart';
8
import '../globals.dart' as globals;
9 10 11 12 13 14 15 16

/// The  web workflow instance.
WebWorkflow get webWorkflow => context.get<WebWorkflow>();

class WebWorkflow extends Workflow {
  const WebWorkflow();

  @override
17
  bool get appliesToHostPlatform => featureFlags.isWebEnabled && (globals.platform.isWindows || globals.platform.isMacOS || globals.platform.isLinux);
18 19

  @override
20
  bool get canLaunchDevices => featureFlags.isWebEnabled;
21 22

  @override
23
  bool get canListDevices => featureFlags.isWebEnabled;
24 25 26 27

  @override
  bool get canListEmulators => false;
}