macos_workflow.dart 1.04 KB
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 14 15 16
///
/// This workflow requires the flutter-desktop-embedding as a sibling
/// repository to the flutter repo.
class MacOSWorkflow implements Workflow {
17 18 19 20 21 22 23 24
  const MacOSWorkflow({
    @required Platform platform,
    @required FeatureFlags featureFlags,
  }) : _platform = platform,
       _featureFlags = featureFlags;

  final Platform _platform;
  final FeatureFlags _featureFlags;
25 26

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

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

  @override
33
  bool get canListDevices => _platform.isMacOS && _featureFlags.isMacOSEnabled;
34 35 36 37

  @override
  bool get canListEmulators => false;
}