Consider for example this code from semantics_service_test (/cc @amirh )
SystemChannels.accessibility.setMockMessageHandler((Object mockMessage) async {
final Map<String, dynamic> message = mockMessage;
log.add(message);
});
This triggers runtime check failure in Dart 2 mode because Map<dynamic, dynamic> is not a subtype of Map<String, dynamic>.
I have discussed this with @mravn-google and we decided to go by fixing the consumer side, especially because Dart lacks features needed to correctly preserve type arguments across channel boundaries for arbitrary types.
I am gonna handle updating tests in Flutter repo, while @mravn-google team is gonna take care of packages that contain similar issues, e.g. https://github.com/flutter/plugins/blob/master/packages/video_player/lib/video_player.dart#L162-L163