Skip to content

Conversation

@pq
Copy link
Collaborator

@pq pq commented Dec 2, 2025

Introduces a DTDProcess abstraction that will be used in a service that handles analytics checking and consent management.

Much of the logic is extracted from DartToolingDaemonService. Once the analytics service is implemented and proven out, DartToolingDaemonService will be refactored to use DTDProcess and the duplication removed.

Still a WIP, but client access might look something like this:

      DTDProcess dtdProcess = new DTDProcess();
      dtdProcess.setListener(new DTDProcessListener() {
        @Override
        public void onProcessStarted(@Nullable String uri) {
          JsonObject params = new JsonObject();
          params.addProperty("tool", getToolName());
          try {
            dtdProcess.sendRequest("UnifiedAnalytics.getConsentMessage", params, true, new DartToolingDaemonConsumer() {
              @Override
              public void received(@NotNull JsonObject response) {
                // Do stuff.
              }
            });
          } catch (WebSocketException e) {
            // Handle
          }
        }
      });
      dtdProcess.start(sdk);
...

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

@pq pq requested review from helin24 and jwren December 2, 2025 03:41
@pq pq merged commit e78f04e into flutter:main Dec 2, 2025
9 checks passed
@pq pq deleted the analytics_dtdProcess branch December 2, 2025 09:16
@helin24
Copy link
Member

helin24 commented Dec 4, 2025

Looks great other than my comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants