More AppContext cleanups (#7073)
diff --git a/packages/flutter_tools/lib/src/ios/mac.dart b/packages/flutter_tools/lib/src/ios/mac.dart index da726d5..f727f38 100644 --- a/packages/flutter_tools/lib/src/ios/mac.dart +++ b/packages/flutter_tools/lib/src/ios/mac.dart
@@ -56,7 +56,7 @@ } /// Returns [XCode] active in the current app context. - static XCode get instance => context[XCode] ?? (context[XCode] = new XCode()); + static XCode get instance => context[XCode]; bool get isInstalledAndMeetsVersionCheck => isInstalled && xcodeVersionSatisfactory;
diff --git a/packages/flutter_tools/lib/src/ios/simulators.dart b/packages/flutter_tools/lib/src/ios/simulators.dart index 6d405c8..d0bae71 100644 --- a/packages/flutter_tools/lib/src/ios/simulators.dart +++ b/packages/flutter_tools/lib/src/ios/simulators.dart
@@ -37,9 +37,7 @@ class IOSSimulatorUtils { /// Returns [IOSSimulatorUtils] active in the current app context (i.e. zone). - static IOSSimulatorUtils get instance { - return context[IOSSimulatorUtils] ?? (context[IOSSimulatorUtils] = new IOSSimulatorUtils()); - } + static IOSSimulatorUtils get instance => context[IOSSimulatorUtils]; List<IOSSimulator> getAttachedDevices() { if (!XCode.instance.isInstalledAndMeetsVersionCheck) @@ -54,7 +52,7 @@ /// A wrapper around the `simctl` command line tool. class SimControl { /// Returns [SimControl] active in the current app context (i.e. zone). - static SimControl get instance => context[SimControl] ?? (context[SimControl] = new SimControl()); + static SimControl get instance => context[SimControl]; Future<bool> boot({ String deviceName }) async { if (_isAnyConnected())