fix type error in service_worker_test.dart (#99524)

diff --git a/dev/bots/service_worker_test.dart b/dev/bots/service_worker_test.dart
index 3e64ef7..1dbef88 100644
--- a/dev/bots/service_worker_test.dart
+++ b/dev/bots/service_worker_test.dart
@@ -57,7 +57,8 @@
 /// test zone.
 void expect(Object? actual, Object? expected) {
   final Matcher matcher = wrapMatcher(expected);
-  final Map<Object, Object> matchState = <Object, Object>{};
+  // matchState needs to be of type <Object?, Object?>, see https://github.com/flutter/flutter/issues/99522
+  final Map<Object?, Object?> matchState = <Object?, Object?>{};
   if (matcher.matches(actual, matchState)) {
     return;
   }