macos_workflow.dart 952 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 7
import 'package:meta/meta.dart';

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


12
/// The macOS-specific implementation of a [Workflow].
13
class MacOSWorkflow implements Workflow {
14 15 16 17 18 19 20 21
  const MacOSWorkflow({
    @required Platform platform,
    @required FeatureFlags featureFlags,
  }) : _platform = platform,
       _featureFlags = featureFlags;

  final Platform _platform;
  final FeatureFlags _featureFlags;
22 23

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

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

  @override
30
  bool get canListDevices => _platform.isMacOS && _featureFlags.isMacOSEnabled;
31 32 33 34

  @override
  bool get canListEmulators => false;
}