diff --git a/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md b/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md index 3b2d72be319..8deaf925751 100644 --- a/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md +++ b/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md @@ -16,7 +16,7 @@ an IDE. - [#7030](https://github.com/flutter/devtools/pull/7030) * Removed the "Dense mode" setting. - [#7086](https://github.com/flutter/devtools/pull/7086) * Added support for filtering with regular expressions in the Logging, Network, and CPU profiler pages - [#7027](https://github.com/flutter/devtools/pull/7027) -* Add a DevTools server interaction for getting the DTD uri. - [#7054](https://github.com/flutter/devtools/pull/7054) +* Add a DevTools server interaction for getting the DTD uri. - [#7054](https://github.com/flutter/devtools/pull/7054), [#7164](https://github.com/flutter/devtools/pull/7164) * Enabled expression evaluation with scope for the web, allowing evaluation of inspected widgets. - [#7144](https://github.com/flutter/devtools/pull/7144) * Update `package:vm_service` constraint to `^14.0.0`. - [#6953](https://github.com/flutter/devtools/pull/6953) diff --git a/packages/devtools_shared/lib/src/server/server_api.dart b/packages/devtools_shared/lib/src/server/server_api.dart index eb61133ba0b..5c35fb7a222 100644 --- a/packages/devtools_shared/lib/src/server/server_api.dart +++ b/packages/devtools_shared/lib/src/server/server_api.dart @@ -36,7 +36,7 @@ class ServerApi { required ExtensionsManager extensionsManager, required DeeplinkManager deeplinkManager, ServerApi? api, - String? Function()? dtdUri, + String? dtdUri, }) { api ??= ServerApi(); final queryParams = request.requestedUri.queryParameters; @@ -255,9 +255,7 @@ class ServerApi { ); case DtdApi.apiGetDtdUri: return api.setCompleted( - json.encode({ - DtdApi.uriPropertyName: dtdUri?.call(), - }), + json.encode({DtdApi.uriPropertyName: dtdUri}), ); default: return api.notImplemented(); diff --git a/packages/devtools_shared/test/server/server_api_test.dart b/packages/devtools_shared/test/server/server_api_test.dart index a0e017b4681..e661531ea4c 100644 --- a/packages/devtools_shared/test/server/server_api_test.dart +++ b/packages/devtools_shared/test/server/server_api_test.dart @@ -167,7 +167,7 @@ void main() { request, extensionsManager: ExtensionsManager(buildDir: '/'), deeplinkManager: fakeManager, - dtdUri: () => dtdUri, + dtdUri: dtdUri, ); expect(response.statusCode, HttpStatus.ok); expect(