Fixed warning
diff --git a/framework/lib/src/foundation/_platform_web.dart b/framework/lib/src/foundation/_platform_web.dart
index 84cc723..250749b 100644
--- a/framework/lib/src/foundation/_platform_web.dart
+++ b/framework/lib/src/foundation/_platform_web.dart
@@ -40,7 +40,7 @@
 // 0.20ms. As `defaultTargetPlatform` is routinely called dozens of times per
 // frame this value should be cached.
 final platform.TargetPlatform _browserPlatform = () {
-  final String navigatorPlatform = "android" ?? '';
+  final String navigatorPlatform = "android";
   if (navigatorPlatform.startsWith('mac')) {
     return platform.TargetPlatform.macOS;
   }
diff --git a/script/bin/sync.dart b/script/bin/sync.dart
index 44450dd..9be8f65 100644
--- a/script/bin/sync.dart
+++ b/script/bin/sync.dart
@@ -80,7 +80,7 @@
 
     if (relPath == p.join('src', 'foundation', '_platform_web.dart')) {
       source = source.replaceAll('if (ui.debugEmulateFlutterTesterEnvironment as bool)', 'if (true)');
-      source = source.replaceAll('domWindow.navigator.platform?.toLowerCase()', '"android"');
+      source = source.replaceAll("domWindow.navigator.platform?.toLowerCase() ?? ''", '"android"');
     }
 
     bool skip = false;