linux_workflow.dart 1.01 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
import '../base/platform.dart';
6
import '../doctor_validator.dart';
7
import '../features.dart';
8 9 10 11 12 13

/// The windows-specific implementation of a [Workflow].
///
/// This workflow requires the flutter-desktop-embedding as a sibling
/// repository to the flutter repo.
class LinuxWorkflow implements Workflow {
14
  const LinuxWorkflow({
15 16
    required Platform platform,
    required FeatureFlags featureFlags,
17 18 19 20 21
  }) : _platform = platform,
       _featureFlags = featureFlags;

  final Platform _platform;
  final FeatureFlags _featureFlags;
22 23

  @override
24
  bool get appliesToHostPlatform => _platform.isLinux && _featureFlags.isLinuxEnabled;
25 26

  @override
27
  bool get canLaunchDevices => _platform.isLinux && _featureFlags.isLinuxEnabled;
28 29

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

  @override
  bool get canListEmulators => false;
}