Remove deprecated onPlatformMessage from TestWindow and TestPlatformDispatcher (#133183)

This commit is contained in:
Kate Lovett 2023-08-25 15:46:11 -05:00 committed by GitHub
parent 721016c1db
commit 72bd36026f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -442,21 +442,6 @@ class TestPlatformDispatcher implements PlatformDispatcher {
_platformDispatcher.sendPlatformMessage(name, data, callback);
}
@Deprecated(
'Instead of calling this callback, use ServicesBinding.instance.channelBuffers.push. '
'This feature was deprecated after v2.1.0-10.0.pre.'
)
@override
PlatformMessageCallback? get onPlatformMessage => _platformDispatcher.onPlatformMessage;
@Deprecated(
'Instead of setting this callback, use ServicesBinding.instance.defaultBinaryMessenger.setMessageHandler. '
'This feature was deprecated after v2.1.0-10.0.pre.'
)
@override
set onPlatformMessage(PlatformMessageCallback? callback) {
_platformDispatcher.onPlatformMessage = callback;
}
/// Delete any test value properties that have been set on this [TestPlatformDispatcher]
/// and return to reporting the real [PlatformDispatcher] values for all
/// [PlatformDispatcher] properties.
@ -1838,21 +1823,6 @@ class TestWindow implements SingletonFlutterWindow {
platformDispatcher.sendPlatformMessage(name, data, callback);
}
@Deprecated(
'Instead of calling this callback, use ServicesBinding.instance.channelBuffers.push. '
'This feature was deprecated after v2.1.0-10.0.pre.'
)
@override
PlatformMessageCallback? get onPlatformMessage => platformDispatcher.onPlatformMessage;
@Deprecated(
'Instead of setting this callback, use ServicesBinding.instance.defaultBinaryMessenger.setMessageHandler. '
'This feature was deprecated after v2.1.0-10.0.pre.'
)
@override
set onPlatformMessage(PlatformMessageCallback? callback) {
platformDispatcher.onPlatformMessage = callback;
}
/// Delete any test value properties that have been set on this [TestWindow]
/// as well as its [platformDispatcher].
///