Skip to content

Commit 23a1bf0

Browse files
Handle null values for FlutterStore.flutterClientId. (#9820)
Required bug fix for the devtools release: #9819. This also bumps the flutter version to the latest.
1 parent 5febd5b commit 23a1bf0

8 files changed

Lines changed: 25 additions & 31 deletions

File tree

flutter-candidate.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b0e66e6dd81c20dae6a3ce2ee515a165dbbbfb3e
1+
02a06a851ff3d25e353f5f33f46c47f179e70467

packages/devtools_app/lib/src/framework/observer/_memory_web.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ extension type _UserAgentSpecificMemoryBreakdownAttributionElement._(JSObject _)
6565
@JS()
6666
extension type _UserAgentSpecificMemoryBreakdownAttributionContainerElement._(
6767
JSObject _
68-
) implements JSObject {
68+
)
69+
implements JSObject {
6970
external String get id;
7071

7172
external String get url;

packages/devtools_app/test/service/timeline_streams_test.dart

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,23 @@ void main() {
2222
await env.tearDownEnvironment(force: true);
2323
});
2424

25-
test(
26-
'timeline streams initialized on vm service opened',
27-
() async {
28-
await env.setupEnvironment();
25+
test('timeline streams initialized on vm service opened', () async {
26+
await env.setupEnvironment();
2927

30-
// Await a short delay to make sure the timelineStreamManager is done
31-
// initializing.
32-
await delay();
28+
// Await a short delay to make sure the timelineStreamManager is done
29+
// initializing.
30+
await delay();
3331

34-
expect(serviceConnection.serviceManager.service, equals(env.service));
35-
expect(serviceConnection.timelineStreamManager, isNotNull);
36-
expect(
37-
serviceConnection.timelineStreamManager.basicStreams,
38-
isNotEmpty,
39-
);
40-
expect(
41-
serviceConnection.timelineStreamManager.advancedStreams,
42-
isNotEmpty,
43-
);
32+
expect(serviceConnection.serviceManager.service, equals(env.service));
33+
expect(serviceConnection.timelineStreamManager, isNotNull);
34+
expect(serviceConnection.timelineStreamManager.basicStreams, isNotEmpty);
35+
expect(
36+
serviceConnection.timelineStreamManager.advancedStreams,
37+
isNotEmpty,
38+
);
4439

45-
await env.tearDownEnvironment();
46-
},
47-
timeout: const Timeout.factor(4),
48-
);
40+
await env.tearDownEnvironment();
41+
}, timeout: const Timeout.factor(4));
4942

5043
test('notifies on stream change', () async {
5144
await env.setupEnvironment();

packages/devtools_shared/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ Copyright 2025 The Flutter Authors
33
Use of this source code is governed by a BSD-style license that can be
44
found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
55
-->
6+
# 13.0.1
7+
* Handle null values for `FlutterStore.flutterClientId`.
8+
69
# 13.0.0
710
* **Breaking change:** Removed `DevToolsStoreKeys.analyticsEnabled` and
811
`DevToolsStoreKeys.isFirstRun` since these were only used for legacy analytics.

packages/devtools_shared/lib/src/server/flutter_store.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ class FlutterStore {
1717

1818
bool get gaEnabled => properties[gaEnabledKey] == true;
1919

20-
String get flutterClientId => properties[flutterClientIdKey] as String;
20+
String get flutterClientId =>
21+
(properties[flutterClientIdKey] as String?) ?? '';
2122
}

packages/devtools_shared/lib/src/server/server_api.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,8 @@ class ServerApi {
6868
dtd,
6969
);
7070

71-
// TODO(kenz): remove legacy analytics once the unified analytics rollout
72-
// is complete and verified for robustness (est. Fall 2025).
73-
7471
// ----- Flutter Tool GA store. -----
7572
case apiGetFlutterGAClientId:
76-
// Flutter Tool GA clientId - ONLY get Flutter's clientId if enabled is
77-
// true.
7873
return _encodeResponse(
7974
LocalFileSystem.flutterStoreExists()
8075
? _flutterStore.flutterClientId

packages/devtools_shared/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name: devtools_shared
55
description: Package of shared Dart structures between devtools_app, dds, and other tools.
66

7-
version: 13.0.0
7+
version: 13.0.1
88

99
repository: https://github.com/flutter/devtools/tree/master/packages/devtools_shared
1010

packages/devtools_shared/test/server/persistent_properties_test.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ void main() {
1515
const storeName = 'test_store';
1616

1717
setUp(() {
18-
tempDir = Directory.systemTemp.createTempSync('persistent_properties_test');
18+
tempDir =
19+
Directory.systemTemp.createTempSync('persistent_properties_test');
1920
properties = IOPersistentProperties(
2021
storeName,
2122
documentDirPath: tempDir.path,

0 commit comments

Comments
 (0)