diff --git a/packages/flutter_tools/lib/src/base/context.dart b/packages/flutter_tools/lib/src/base/context.dart index e3f2438e76..8dc8bbf39f 100644 --- a/packages/flutter_tools/lib/src/base/context.dart +++ b/packages/flutter_tools/lib/src/base/context.dart @@ -117,17 +117,6 @@ class AppContext { return _unboxNull(value ?? _generateIfNecessary(T, _fallbacks)) as T; } - /// Gets the value associated with the specified [type], or `null` if no - /// such value has been associated. - @Deprecated('use get instead for type safety.') - Object operator [](Type type) { - dynamic value = _generateIfNecessary(type, _overrides); - if (value == null && _parent != null) { - value = _parent[type]; - } - return _unboxNull(value ?? _generateIfNecessary(type, _fallbacks)); - } - /// Runs [body] in a child context and returns the value returned by [body]. /// /// If [overrides] is specified, the child context will return corresponding diff --git a/packages/flutter_tools/lib/src/plugins.dart b/packages/flutter_tools/lib/src/plugins.dart index 613400cbfb..19cdc1b873 100644 --- a/packages/flutter_tools/lib/src/plugins.dart +++ b/packages/flutter_tools/lib/src/plugins.dart @@ -35,28 +35,31 @@ class Plugin { /// Parses [Plugin] specification from the provided pluginYaml. /// /// This currently supports two formats. Legacy and Multi-platform. + /// /// Example of the deprecated Legacy format. - /// flutter: - /// plugin: - /// androidPackage: io.flutter.plugins.sample - /// iosPrefix: FLT - /// pluginClass: SamplePlugin + /// + /// flutter: + /// plugin: + /// androidPackage: io.flutter.plugins.sample + /// iosPrefix: FLT + /// pluginClass: SamplePlugin /// /// Example Multi-platform format. - /// flutter: - /// plugin: - /// platforms: - /// android: - /// package: io.flutter.plugins.sample - /// pluginClass: SamplePlugin - /// ios: - /// pluginClass: SamplePlugin - /// linux: - /// pluginClass: SamplePlugin - /// macos: - /// pluginClass: SamplePlugin - /// windows: - /// pluginClass: SamplePlugin + /// + /// flutter: + /// plugin: + /// platforms: + /// android: + /// package: io.flutter.plugins.sample + /// pluginClass: SamplePlugin + /// ios: + /// pluginClass: SamplePlugin + /// linux: + /// pluginClass: SamplePlugin + /// macos: + /// pluginClass: SamplePlugin + /// windows: + /// pluginClass: SamplePlugin factory Plugin.fromYaml(String name, String path, dynamic pluginYaml) { final List errors = validatePluginYaml(pluginYaml); if (errors.isNotEmpty) { @@ -65,7 +68,7 @@ class Plugin { if (pluginYaml != null && pluginYaml['platforms'] != null) { return Plugin._fromMultiPlatformYaml(name, path, pluginYaml); } - return Plugin._fromLegacyYaml(name, path, pluginYaml); // ignore: deprecated_member_use_from_same_package + return Plugin._fromLegacyYaml(name, path, pluginYaml); } factory Plugin._fromMultiPlatformYaml(String name, String path, dynamic pluginYaml) { @@ -118,7 +121,6 @@ class Plugin { ); } - @deprecated factory Plugin._fromLegacyYaml(String name, String path, dynamic pluginYaml) { final Map platforms = {}; final String pluginClass = pluginYaml['pluginClass']; @@ -396,7 +398,7 @@ Future _writeAndroidPluginRegistrant(FlutterProject project, List case AndroidEmbeddingVersion.v2: templateContext['needsShim'] = false; // If a plugin is using an embedding version older than 2.0 and the app is using 2.0, - // then add shim for the old plugins. + // then add shim for the old plugins. for (Map plugin in androidPlugins) { if (plugin['supportsEmbeddingV1'] && !plugin['supportsEmbeddingV2']) { templateContext['needsShim'] = true;