Refactor `FlutterDevice.connect` and VM service discovery (#191221)
## Description Refactors `FlutterDevice.connect` in `packages/flutter_tools` to accept a single resolved `Uri` instead of a `Stream<Uri>`. - Replaces `FlutterDevice.vmServiceUris` with `Future<Uri>? vmServiceUri`. - Eliminates stream subscription, `_isListeningForVmServiceUri`, and stream state management from `resident_runner.dart`. - Moves single VM service candidate resolution into `VMServiceDiscoveryForAttach.firstValidUri` and `AttachCommand._discoverVmService`. - Updates `attach.dart`, `run_cold.dart`, `run_hot.dart`, and associated test suites. ## Tests - `packages/flutter_tools/test/commands.shard/hermetic/attach_test.dart` - `packages/flutter_tools/test/general.shard/cold_test.dart` - `packages/flutter_tools/test/general.shard/device_vm_service_discovery_for_attach_test.dart` - `packages/flutter_tools/test/general.shard/resident_runner_test.dart` - `packages/flutter_tools/test/general.shard/resident_web_runner_test.dart` - `packages/flutter_tools/test/general.shard/run_hot_test.dart` - `packages/flutter_tools/test/general.shard/proxied_devices/proxied_devices_test.dart`
B
Ben Konyi committed
d525d4d19eb1fb40888031668690ea494e2b86e4
Parent: 9479bb7
Committed by GitHub <noreply@github.com>
on 8/21/2026, 8:03:21 PM