Add 'vm:keep-name' pragmas to platform channel classes (#131271)

Pragma will allow future proofing Dart snapshot utilities to work by preserving the names of important classes used in platform channel communication

@Hixie
This commit is contained in:
Chris Evans 2023-07-27 02:30:23 +01:00 committed by GitHub
parent 61fd11db2b
commit 2240649358
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,7 @@ abstract class MessageCodec<T> {
}
/// A command object representing the invocation of a named method.
@pragma('vm:keep-name')
@immutable
class MethodCall {
/// Creates a [MethodCall] representing the invocation of [method] with the

View File

@ -246,6 +246,7 @@ class BasicMessageChannel<T> {
/// {@endtemplate}
///
/// See: <https://flutter.dev/platform-channels/>
@pragma('vm:keep-name')
class MethodChannel {
/// Creates a [MethodChannel] with the specified [name].
///