enable lints prefer_spread_collections and prefer_inlined_adds (#35189)

diff --git a/dev/bots/analyze.dart b/dev/bots/analyze.dart
index ffa96e2..4397e65 100644
--- a/dev/bots/analyze.dart
+++ b/dev/bots/analyze.dart
@@ -260,7 +260,9 @@
 Future<void> _runFlutterAnalyze(String workingDirectory, {
   List<String> options = const <String>[],
 }) {
-  return runCommand(flutter, <String>['analyze', '--dartdocs']..addAll(options),
+  return runCommand(
+    flutter,
+    <String>['analyze', '--dartdocs', ...options],
     workingDirectory: workingDirectory,
   );
 }
@@ -456,7 +458,10 @@
     final List<T> result = _deepSearch<T>(
       map,
       key,
-      (seen == null ? <T>{start} : Set<T>.from(seen))..add(key),
+      <T>{
+        if (seen == null) start else ...seen,
+        key,
+      },
     );
     if (result != null) {
       result.insert(0, start);