format operator== according to flutter style guide (#48449)

diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart
index 9109845..debd75a 100644
--- a/packages/flutter_tools/lib/src/device.dart
+++ b/packages/flutter_tools/lib/src/device.dart
@@ -440,14 +440,12 @@
   int get hashCode => id.hashCode;
 
   @override
-  bool operator ==(dynamic other) {
+  bool operator ==(Object other) {
     if (identical(this, other)) {
       return true;
     }
-    if (other is! Device) {
-      return false;
-    }
-    return id == other.id;
+    return other is Device
+        && other.id == id;
   }
 
   @override