macos_workflow.dart 925 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
/// The macOS-specific implementation of a [Workflow].
10
class MacOSWorkflow implements Workflow {
11
  const MacOSWorkflow({
12 13
    required Platform platform,
    required FeatureFlags featureFlags,
14 15 16 17 18
  }) : _platform = platform,
       _featureFlags = featureFlags;

  final Platform _platform;
  final FeatureFlags _featureFlags;
19 20

  @override
21
  bool get appliesToHostPlatform => _platform.isMacOS && _featureFlags.isMacOSEnabled;
22 23

  @override
24
  bool get canLaunchDevices => _platform.isMacOS && _featureFlags.isMacOSEnabled;
25 26

  @override
27
  bool get canListDevices => _platform.isMacOS && _featureFlags.isMacOSEnabled;
28 29 30 31

  @override
  bool get canListEmulators => false;
}