Deprecation cleanup in flutter_tools (#44469)
One deprecated member was no longer used; removed it. The other probably shouldn't be deprecated, because it's not the parser that's deprecated so much as the format it's parsing. The code itself will live on until we decide to stop supporting the format, it's not like people calling the member should use something else.
This commit is contained in:
parent
c921c5ae67
commit
f4da9f72eb
@ -117,17 +117,6 @@ class AppContext {
|
|||||||
return _unboxNull(value ?? _generateIfNecessary(T, _fallbacks)) as T;
|
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<T> 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].
|
/// Runs [body] in a child context and returns the value returned by [body].
|
||||||
///
|
///
|
||||||
/// If [overrides] is specified, the child context will return corresponding
|
/// If [overrides] is specified, the child context will return corresponding
|
||||||
|
@ -35,7 +35,9 @@ class Plugin {
|
|||||||
/// Parses [Plugin] specification from the provided pluginYaml.
|
/// Parses [Plugin] specification from the provided pluginYaml.
|
||||||
///
|
///
|
||||||
/// This currently supports two formats. Legacy and Multi-platform.
|
/// This currently supports two formats. Legacy and Multi-platform.
|
||||||
|
///
|
||||||
/// Example of the deprecated Legacy format.
|
/// Example of the deprecated Legacy format.
|
||||||
|
///
|
||||||
/// flutter:
|
/// flutter:
|
||||||
/// plugin:
|
/// plugin:
|
||||||
/// androidPackage: io.flutter.plugins.sample
|
/// androidPackage: io.flutter.plugins.sample
|
||||||
@ -43,6 +45,7 @@ class Plugin {
|
|||||||
/// pluginClass: SamplePlugin
|
/// pluginClass: SamplePlugin
|
||||||
///
|
///
|
||||||
/// Example Multi-platform format.
|
/// Example Multi-platform format.
|
||||||
|
///
|
||||||
/// flutter:
|
/// flutter:
|
||||||
/// plugin:
|
/// plugin:
|
||||||
/// platforms:
|
/// platforms:
|
||||||
@ -65,7 +68,7 @@ class Plugin {
|
|||||||
if (pluginYaml != null && pluginYaml['platforms'] != null) {
|
if (pluginYaml != null && pluginYaml['platforms'] != null) {
|
||||||
return Plugin._fromMultiPlatformYaml(name, path, pluginYaml);
|
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) {
|
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) {
|
factory Plugin._fromLegacyYaml(String name, String path, dynamic pluginYaml) {
|
||||||
final Map<String, PluginPlatform> platforms = <String, PluginPlatform>{};
|
final Map<String, PluginPlatform> platforms = <String, PluginPlatform>{};
|
||||||
final String pluginClass = pluginYaml['pluginClass'];
|
final String pluginClass = pluginYaml['pluginClass'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user