Skip to content

Commit

Permalink
Merge branch 'master' of github.com:flutter/devtools into profile1
Browse files Browse the repository at this point in the history
  • Loading branch information
polina-c committed Apr 25, 2024
2 parents 4085f2a + e15c472 commit a3cdb0d
Show file tree
Hide file tree
Showing 58 changed files with 75,172 additions and 69,235 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ DEPENDENCIES.md

# Ignore VS code workspaces that may be configured per-user
*.code-workspace

# Ignore devtools_options.yaml files under example.
**/example/**/devtools_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,30 @@ void main() {
expect(testApp.vmServiceUri, isNotNull);
});

setUp(() {
resetDevToolsExtensionEnabledStates();
});

tearDown(() {
resetDevToolsExtensionEnabledStates();
});

testWidgets('end to end extensions flow', (tester) async {
await pumpAndConnectDevTools(tester, testApp);
resetDevToolsExtensionEnabledStates();
await pumpDevTools(tester);

logStatus(
'verify static extensions are available before connecting to an app',
);
expect(extensionService.availableExtensions.value.length, 1);
expect(extensionService.visibleExtensions.value.length, 1);
await _verifyExtensionsSettingsMenu(
tester,
[
ExtensionEnabledState.none, // bar
],
);

await connectToTestApp(tester, testApp);

expect(extensionService.availableExtensions.value.length, 5);
expect(extensionService.visibleExtensions.value.length, 5);
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools_app/lib/devtools.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
// the constant declaration `const String version =`.
// If you change the declaration you must also modify the regex in
// tools/update_version.dart.
const String version = '2.35.0-dev.15';
const String version = '2.35.0-dev.16';
30 changes: 15 additions & 15 deletions packages/devtools_app/lib/src/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -139,26 +139,26 @@ class DevToolsAppState extends State<DevToolsApp> with AutoDisposeMixin {

unawaited(ga.setupDimensions());

if (FeatureFlags.devToolsExtensions) {
addAutoDisposeListener(extensionService.availableExtensions, () {
setState(() {
_clearCachedRoutes();
});
});
addAutoDisposeListener(extensionService.visibleExtensions, () {
setState(() {
_clearCachedRoutes();
});
void clearRoutesAndSetState() {
setState(() {
_clearCachedRoutes();
});
}

if (FeatureFlags.devToolsExtensions) {
addAutoDisposeListener(
extensionService.availableExtensions,
clearRoutesAndSetState,
);
addAutoDisposeListener(
extensionService.visibleExtensions,
clearRoutesAndSetState,
);
}

addAutoDisposeListener(
serviceConnection.serviceManager.isolateManager.mainIsolate,
() {
setState(() {
_clearCachedRoutes();
});
},
clearRoutesAndSetState,
);

_isDarkThemeEnabledPreference = preferences.darkModeTheme.value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ class ExtensionScreen extends Screen {
id: extensionConfig.screenId,
title: extensionConfig.name,
icon: extensionConfig.icon,
// TODO(kenz): support static DevTools extensions.
requiresConnection: true,
requiresConnection: extensionConfig.requiresConnection,
);

final DevToolsExtensionConfig extensionConfig;
Expand Down

0 comments on commit a3cdb0d

Please sign in to comment.