Skip to content

Commit

Permalink
Change dtdUri handle parameter to be a string (flutter#7164)
Browse files Browse the repository at this point in the history
  • Loading branch information
CoderDake authored Feb 5, 2024
1 parent 05129ab commit 762e15f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 2 additions & 4 deletions packages/devtools_shared/lib/src/server/server_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools_shared/test/server/server_api_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ void main() {
request,
extensionsManager: ExtensionsManager(buildDir: '/'),
deeplinkManager: fakeManager,
dtdUri: () => dtdUri,
dtdUri: dtdUri,
);
expect(response.statusCode, HttpStatus.ok);
expect(
Expand Down

0 comments on commit 762e15f

Please sign in to comment.