Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ dart_code_metrics:
# TODO(https://github.com/flutter/devtools/issues/9906) remove these
# excludes as findings are resolved.
- integration_test/**
- lib/src/extensions/**
- lib/src/framework/**
- lib/src/screens/**
- lib/src/service/**
- lib/src/shared/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class EmbeddedExtensionControllerImpl extends EmbeddedExtensionController
final extensionPostEventStream =
StreamController<DevToolsExtensionEvent>.broadcast();

// ignore: unused-code, TODO(https://github.com/flutter/devtools/issues/9907): false positive.
bool _initialized = false;

@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import 'package:flutter/material.dart';
import 'controller.dart';

class EmbeddedExtension extends StatelessWidget {
const EmbeddedExtension({super.key, required this.controller});

final EmbeddedExtensionController controller;
const EmbeddedExtension({
super.key,
required EmbeddedExtensionController controller,
});

@override
Widget build(BuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class ExtensionService extends DisposableController
///
/// This set of extensions will include one version of a DevTools extension
/// per package.
@visibleForTesting
List<DevToolsExtensionConfig> get availableExtensions =>
_currentExtensions.value.availableExtensions;

Expand Down
7 changes: 1 addition & 6 deletions packages/devtools_app/lib/src/framework/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class HomeScreen extends Screen {
titleGenerator: () => devToolsTitle.value,
);

static final id = ScreenMetaData.home.id;

final List<DevToolsJsonFile> sampleData;

@override
Expand Down Expand Up @@ -165,10 +163,7 @@ class _ConnectInputState extends State<ConnectInput> with BlockingActionMixin {
void initState() {
super.initState();
connectDialogController = TextEditingController();
assert(() {
_debugInitVmServiceCache();
return true;
}());
if (kDebugMode) _debugInitVmServiceCache();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

[CONCERN] Since _debugInitVmServiceCache is an asynchronous method that calls setState, it can potentially lead to a "setState() called after dispose()" exception if the widget is disposed before the async operation completes. Consider adding a mounted check before calling setState inside _debugInitVmServiceCache.

Additionally, for consistency with this change, consider updating the saving side in _connectHelper (around line 256) to use if (kDebugMode) instead of assert.

References
  1. Prefix every comment with a severity: [MUST-FIX], [CONCERN], [NIT]. (link)

}

void _debugInitVmServiceCache() async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ bool debugTestReleaseNotes = false;
// from the flutter/website PR, which has a GitHub action that automatically
// stages commits to firebase. Example:
// https://flutter-docs-prod--pr12652-devtools-release-notes-2-52-3bbb8c0u.web.app/tools/devtools/release-notes/release-notes-2.52.0.md.
// ignore: unused-code, debug-only feature.
String? _debugReleaseNotesUrl;

const releaseNotesKey = Key('release_notes');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ class StatusLine extends StatelessWidget {
/// Whether to highlight the footer when DevTools is connected to an app.
final bool highlightForConnection;

static const deviceInfoTooltip = 'Device Info';

/// The padding around the footer in the DevTools UI.
EdgeInsets get padding => const EdgeInsets.symmetric(
horizontal: defaultSpacing,
Expand Down
Loading