anchor.diff:  import 'package:flutter_tools/src/base/config.dart';
   import 'package:flutter_tools/src/base/platform.dart';
   import 'package:flutter_tools/src/features.dart';
  -import 'package:flutter_tools/src/version.dart';
  -import 'package:mockito/mockito.dart';
   
   import '../src/common.dart';
  +import '../src/fakes.dart';
   
   void main() {
     group('Features', () {
  -    MockFlutterVerion mockFlutterVerion;
       Config testConfig;
  -    MockPlatform mockPlatform;
  +    FakePlatform platform;
       FlutterFeatureFlags featureFlags;
   
       setUp(() {
  -      mockFlutterVerion = MockFlutterVerion();
         testConfig = Config.test();
  -      mockPlatform = MockPlatform();
  -      when(mockPlatform.environment).thenReturn(<String, String>{});
  +      platform = FakePlatform(environment: <String, String>{});
   
         for (final Feature feature in allFeatures) {
           testConfig.setValue(feature.configSetting, false);
         }
   
         featureFlags = FlutterFeatureFlags(
  -        flutterVersion: mockFlutterVerion,
  +        flutterVersion: FakeFlutterVersion(),
           config: testConfig,
  -        platform: mockPlatform,
  +        platform: platform,
         );
       });
  +
  +    FeatureFlags createFlags(String channel) {
  +      return FlutterFeatureFlags(
  +        flutterVersion: FakeFlutterVersion(channel: channel),
  +        config: testConfig,
  +        platform: platform,
  +      );
  +    }
   
       testWithoutContext('setting has safe defaults', () {
         const FeatureChannelSetting featureSetting = FeatureChannelSetting();
  
positive.code:     });
  
      testWithoutContext('env variables are only enabled with "true" string', () {
        when(mockPlatform.environment).thenReturn(<String, String>{'FLUTTER_WEB': 'hello'});
  
        expect(featureFlags.isWebEnabled, false);
  
        when(mockPlatform.environment).thenReturn(<String, String>{'FLUTTER_WEB': 'true'});
  
        expect(featureFlags.isWebEnabled, true);
      });
  
negative.code:     /// Flutter macOS desktop.
  
      testWithoutContext('Flutter macos desktop off by default on master', () {
        final FeatureFlags featureFlags = createFlags('master');
  
        expect(featureFlags.isMacOSEnabled, false);
      });
  
      testWithoutContext('Flutter macos desktop enabled with config on master', () {
        final FeatureFlags featureFlags = createFlags('master');
        testConfig.setValue('enable-macos-desktop', true);
  
        expect(featureFlags.isMacOSEnabled, true);
      });
  
      testWithoutContext('Flutter macos desktop enabled with environment variable on master', () {
        final FeatureFlags featureFlags = createFlags('master');
        platform.environment = <String, String>{'FLUTTER_MACOS': 'true'};
  
        expect(featureFlags.isMacOSEnabled, true);
      });
  
      testWithoutContext('Flutter macos desktop off by default on dev', () {
        final FeatureFlags featureFlags = createFlags('dev');
  
        expect(featureFlags.isMacOSEnabled, false);
      });
  
      testWithoutContext('Flutter macos desktop enabled with config on dev', () {
        final FeatureFlags featureFlags = createFlags('dev');
        testConfig.setValue('enable-macos-desktop', true);
  
        expect(featureFlags.isMacOSEnabled, true);
      });
  
      testWithoutContext('Flutter macos desktop enabled with environment variable on dev', () {
        final FeatureFlags featureFlags = createFlags('dev');
        platform.environment = <String, String>{'FLUTTER_MACOS': 'true'};
  
        expect(featureFlags.isMacOSEnabled, true);
      });
  
      testWithoutContext('Flutter macos desktop off by default on beta', () {
        final FeatureFlags featureFlags = createFlags('beta');
  
        expect(featureFlags.isMacOSEnabled, false);
      });
  
      testWithoutContext('Flutter macos desktop enabled with config on beta', () {
        final FeatureFlags featureFlags = createFlags('beta');
        testConfig.setValue('enable-macos-desktop', true);
  
        expect(featureFlags.isMacOSEnabled, true);
      });
  
      testWithoutContext('Flutter macos desktop enabled with environment variable on beta', () {
        final FeatureFlags featureFlags = createFlags('beta');
        platform.environment = <String, String>{'FLUTTER_MACOS': 'true'};
  
        expect(featureFlags.isMacOSEnabled, true);
      });
  
      testWithoutContext('Flutter macos desktop off by default on stable', () {
        final FeatureFlags featureFlags = createFlags('stable');
  
        expect(featureFlags.isMacOSEnabled, false);
      });
  
      testWithoutContext('Flutter macos desktop enabled with config on stable', () {
        final FeatureFlags featureFlags = createFlags('stable');
        testConfig.setValue('enable-macos-desktop', true);
  
        expect(featureFlags.isMacOSEnabled, true);
      });
  
      testWithoutContext('Flutter macos desktop enabled with environment variable on stable', () {
        final FeatureFlags featureFlags = createFlags('stable');
        platform.environment = <String, String>{'FLUTTER_MACOS': 'true'};
  
        expect(featureFlags.isMacOSEnabled, true);
      });
  
      /// Flutter Linux Desktop
      testWithoutContext('Flutter linux desktop off by default on master', () {
        final FeatureFlags featureFlags = createFlags('stable');
  
        expect(featureFlags.isLinuxEnabled, false);
      });
  
      testWithoutContext('Flutter linux desktop enabled with config on master', () {
        final FeatureFlags featureFlags = createFlags('master');
        testConfig.setValue('enable-linux-desktop', true);
  
        expect(featureFlags.isLinuxEnabled, true);
      });
  
      testWithoutContext('Flutter linux desktop enabled with environment variable on master', () {
        final FeatureFlags featureFlags = createFlags('master');
        platform.environment = <String, String>{'FLUTTER_LINUX': 'true'};
  
        expect(featureFlags.isLinuxEnabled, true);
      });
  
      testWithoutContext('Flutter linux desktop off by default on dev', () {
        final FeatureFlags featureFlags = createFlags('dev');
  
        expect(featureFlags.isLinuxEnabled, false);
      });
  
      testWithoutContext('Flutter linux desktop enabled with config on dev', () {
        final FeatureFlags featureFlags = createFlags('dev');
        testConfig.setValue('enable-linux-desktop', true);
  
        expect(featureFlags.isLinuxEnabled, true);
      });
  
      testWithoutContext('Flutter linux desktop enabled with environment variable on dev', () {
        final FeatureFlags featureFlags = createFlags('dev');
        platform.environment = <String, String>{'FLUTTER_LINUX': 'true'};
  
        expect(featureFlags.isLinuxEnabled, true);
      });
  
      testWithoutContext('Flutter linux desktop off by default on beta', () {
        final FeatureFlags featureFlags = createFlags('beta');
  
        expect(featureFlags.isLinuxEnabled, false);
      });
  
      testWithoutContext('Flutter linux desktop enabled with config on beta', () {
        final FeatureFlags featureFlags = createFlags('beta');
        testConfig.setValue('enable-linux-desktop', true);
  
        expect(featureFlags.isLinuxEnabled, true);
      });
  
      testWithoutContext('Flutter linux desktop enabled with environment variable on beta', () {
        final FeatureFlags featureFlags = createFlags('beta');
        platform.environment = <String, String>{'FLUTTER_LINUX': 'true'};
  
        expect(featureFlags.isLinuxEnabled, true);
      });
  
      testWithoutContext('Flutter linux desktop off by default on stable', () {
        final FeatureFlags featureFlags = createFlags('stable');
  
        expect(featureFlags.isLinuxEnabled, false);
      });
  
      testWithoutContext('Flutter linux desktop enabled with config on stable', () {
        final FeatureFlags featureFlags = createFlags('stable');
        testConfig.setValue('enable-linux-desktop', true);
  
        expect(featureFlags.isLinuxEnabled, true);
      });
  
      testWithoutContext('Flutter linux desktop enabled with environment variable on stable', () {
        final FeatureFlags featureFlags = createFlags('stable');
        platform.environment = <String, String>{'FLUTTER_LINUX': 'true'};
  
        expect(featureFlags.isLinuxEnabled, true);
      });
  
      /// Flutter Windows desktop.
      testWithoutContext('Flutter Windows desktop off by default on master', () {
        final FeatureFlags featureFlags = createFlags('master');
  
        expect(featureFlags.isWindowsEnabled, false);
      });
  
      testWithoutContext('Flutter Windows desktop enabled with config on master', () {
        final FeatureFlags featureFlags = createFlags('master');
        testConfig.setValue('enable-windows-desktop', true);
  
        expect(featureFlags.isWindowsEnabled, true);
      });
  
      testWithoutContext('Flutter Windows desktop enabled with environment variable on master', () {
        final FeatureFlags featureFlags = createFlags('master');
        platform.environment = <String, String>{'FLUTTER_WINDOWS': 'true'};
  
        expect(featureFlags.isWindowsEnabled, true);
      });
  
      testWithoutContext('Flutter Windows desktop off by default on dev', () {
        final FeatureFlags featureFlags = createFlags('dev');
  
        expect(featureFlags.isWindowsEnabled, false);
      });
  
      testWithoutContext('Flutter Windows desktop enabled with config on dev', () {
        final FeatureFlags featureFlags = createFlags('dev');
        testConfig.setValue('enable-windows-desktop', true);
  
        expect(featureFlags.isWindowsEnabled, true);
      });
  
      testWithoutContext('Flutter Windows desktop not enabled with environment variable on dev', () {
        final FeatureFlags featureFlags = createFlags('dev');
        platform.environment = <String, String>{'FLUTTER_WINDOWS': 'true'};
  
        expect(featureFlags.isWindowsEnabled, true);
      });
  
      testWithoutContext('Flutter Windows desktop off by default on beta', () {
        final FeatureFlags featureFlags = createFlags('beta');
  
        expect(featureFlags.isWindowsEnabled, false);
      });
  
      testWithoutContext('Flutter Windows desktop enabled with config on beta', () {
        final FeatureFlags featureFlags = createFlags('beta');
        testConfig.setValue('enable-windows-desktop', true);
  
        expect(featureFlags.isWindowsEnabled, true);
      });
  
      testWithoutContext('Flutter Windows desktop enabled with environment variable on beta', () {
        final FeatureFlags featureFlags = createFlags('beta');
        platform.environment = <String, String>{'FLUTTER_WINDOWS': 'true'};
  
        expect(featureFlags.isWindowsEnabled, true);
      });
  
      testWithoutContext('Flutter Windows desktop off by default on stable', () {
        final FeatureFlags featureFlags = createFlags('stable');
  
        expect(featureFlags.isWindowsEnabled, false);
      });
  
      testWithoutContext('Flutter Windows desktop enabled with config on stable', () {
        final FeatureFlags featureFlags = createFlags('stable');
        testConfig.setValue('enable-windows-desktop', true);
  
        expect(featureFlags.isWindowsEnabled, true);
      });
  
      testWithoutContext('Flutter Windows desktop enabled with environment variable on stable', () {
        final FeatureFlags featureFlags = createFlags('stable');
        platform.environment = <String, String>{'FLUTTER_WINDOWS': 'true'};
  
        expect(featureFlags.isWindowsEnabled, true);
      });
  