macos_workflow.dart 948 Bytes
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4 5 6 7
// 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 '../base/platform.dart';
import '../doctor.dart';
8
import '../features.dart';
9 10

/// The [MacOSWorkflow] instance.
11
MacOSWorkflow get macOSWorkflow => context.get<MacOSWorkflow>();
12

13
/// The macOS-specific implementation of a [Workflow].
14 15 16 17 18 19 20
///
/// This workflow requires the flutter-desktop-embedding as a sibling
/// repository to the flutter repo.
class MacOSWorkflow implements Workflow {
  const MacOSWorkflow();

  @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;
}