Repository navigation
[flutter_tools] Migrate DriveCommand, FlutterDriverFactory, and WebDriverService to constructor DI - #193543
Merged
auto-submit[bot] merged 10 commits intoOct 3, 2026
Conversation
…and clean up import
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors dependency injection across several Flutter tool commands and services, including the daemon and drive commands, by explicitly passing buildSystem, buildTargets, analytics, and xcode dependencies rather than relying on global state. In web_driver_service.dart, the platform parameter in getDesiredCapabilities is now required. Feedback on these changes highlights a compilation error in web_driver_service.dart where platform was removed from the ToolContext destructuring in startTest but is now required by getDesiredCapabilities.
# Conflicts: # packages/flutter_tools/test/general.shard/drive/web_driver_service_test.dart
…web-driver # Conflicts: # packages/flutter_tools/test/general.shard/drive/web_driver_service_test.dart
…n WebRunnerFactory
chingjun
approved these changes
Oct 2, 2026
This was referenced Oct 3, 2026
suryaKommana2662
pushed a commit
to suryaKommana2662/flutter
that referenced
this pull request
Oct 29, 2026
…iverService to constructor DI (flutter#193543) Migrates `DriveCommand`, `FlutterDriverFactory`, and `WebDriverService` to explicit constructor dependency injection via `ToolContext`, `Analytics`, `BuildSystem`, and `BuildTargets`. Fork diff: bkonyi/flutter@master...di/22b-2-drive-and-web-driver Part of flutter#188471 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates
DriveCommand,FlutterDriverFactory, andWebDriverServiceto explicit constructor dependency injection viaToolContext,Analytics,BuildSystem, andBuildTargets.Fork diff: bkonyi/flutter@master...di/22b-2-drive-and-web-driver
Part of #188471
Pre-launch Checklist
///).