Skip to content

Commit 57ddcd2

Browse files
committed
Remove unused code from screens/
1 parent 6c38057 commit 57ddcd2

56 files changed

Lines changed: 45 additions & 330 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

analysis_options.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ dart_code_metrics:
164164
# TODO(https://github.com/flutter/devtools/issues/9906) remove these
165165
# excludes as findings are resolved.
166166
- integration_test/**
167-
- lib/src/screens/**
167+
# Investigate internal usages of inspector_controller before removing.
168+
- lib/src/screens/inspector/**_controller.dart
168169
- lib/src/service/**
169170
- lib/src/shared/**
170171
- lib/src/standalone_ui/**

packages/devtools_app/lib/src/screens/accessibility/accessibility_screen.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ export 'semantics_tree_pane.dart';
1919
class AccessibilityScreen extends Screen {
2020
AccessibilityScreen() : super.fromMetaData(ScreenMetaData.accessibility);
2121

22-
static final id = ScreenMetaData.accessibility.id;
23-
2422
@override
2523
Widget buildScreenBody(BuildContext context) =>
2624
const AccessibilityScreenBody();
@@ -36,11 +34,13 @@ class AccessibilityScreenBody extends StatefulWidget {
3634

3735
class _AccessibilityScreenBodyState extends State<AccessibilityScreenBody>
3836
with AutoDisposeMixin {
37+
// ignore: unused-code, temporarily ignore since this screen is under active development.
3938
late AccessibilityController controller;
4039

4140
@override
4241
void initState() {
4342
super.initState();
43+
// ignore: unused-code, temporarily ignore since this screen is under active development.
4444
controller = screenControllers.lookup<AccessibilityController>();
4545
}
4646

packages/devtools_app/lib/src/screens/app_size/app_size_screen.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ class _AppSizeBodyState extends State<AppSizeBody>
212212
if (currentTab.key == AppSizeScreen.diffTabKey) ...[
213213
const SizedBox(width: defaultSpacing),
214214
DiffTreeTypeDropdown(
215-
value: controller.activeDiffTreeType.value,
216215
onChanged: (newDiffTreeType) {
217216
controller.changeActiveDiffTreeType(newDiffTreeType!);
218217
},
@@ -279,11 +278,9 @@ class AppUnitDropdown extends StatelessWidget {
279278
class DiffTreeTypeDropdown extends StatelessWidget {
280279
const DiffTreeTypeDropdown({
281280
super.key,
282-
required this.value,
283281
required this.onChanged,
284282
});
285283

286-
final DiffTreeType value;
287284
final ValueChanged<DiffTreeType?>? onChanged;
288285

289286
@override

packages/devtools_app/lib/src/screens/debugger/breakpoint_manager.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class BreakpointManager with DisposerMixin {
2323

2424
final _breakPositionsMap = <String, List<SourcePosition>>{};
2525

26-
ValueListenable<List<Breakpoint>> get breakpoints => _breakpoints;
2726
final _breakpoints = ValueNotifier<List<Breakpoint>>([]);
2827

2928
ValueListenable<List<BreakpointAndSourcePosition>>

packages/devtools_app/lib/src/screens/debugger/codeview_controller.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ class CodeViewSourceLocationNavigationState extends DevToolsNavigationState {
533533
DevToolsNavigationState state,
534534
) : super(kind: type, state: state.state);
535535

536+
@visibleForTesting
536537
static CodeViewSourceLocationNavigationState? fromState(
537538
DevToolsNavigationState? state,
538539
) {

packages/devtools_app/lib/src/screens/debugger/span_parser.dart

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -589,19 +589,6 @@ class ScopeStack {
589589
/// Location where the next produced span should begin.
590590
ScopeStackLocation _nextLocation = ScopeStackLocation.zero;
591591

592-
/// Adds a scope for a given region.
593-
///
594-
/// This method is the same as calling [push] and then [pop] with the same
595-
/// args.
596-
void add(
597-
String? scope, {
598-
required ScopeStackLocation start,
599-
required ScopeStackLocation end,
600-
}) {
601-
push(scope, start);
602-
pop(scope, end);
603-
}
604-
605592
/// Pushes a new scope onto the stack starting at [location].
606593
void push(String? scope, ScopeStackLocation location) {
607594
if (scope == null) return;
@@ -721,6 +708,8 @@ class ScopeStackItem {
721708
ScopeStackItem(this.scope, this.location);
722709

723710
final String scope;
711+
712+
// ignore: unused-code, foundational to this data class.
724713
final ScopeStackLocation location;
725714
}
726715

packages/devtools_app/lib/src/screens/debugger/syntax_highlighter.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ final _log = Logger('syntax_highlighter');
1818
class SyntaxHighlighter {
1919
SyntaxHighlighter({String? source}) : source = source ?? '';
2020

21+
@visibleForTesting
2122
SyntaxHighlighter.withGrammar({Grammar? grammar, String? source})
2223
: source = source ?? '' {
2324
_grammar = grammar;

packages/devtools_app/lib/src/screens/deep_link_validation/deep_link_list_view.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,12 @@ class DeepLinkListView extends StatefulWidget {
3333
}
3434

3535
class _DeepLinkListViewState extends State<DeepLinkListView> {
36-
late DeepLinksController controller;
37-
3836
@override
3937
void initState() {
4038
super.initState();
41-
controller = screenControllers.lookup<DeepLinksController>()
42-
..firstLoadWithDefaultConfigurations();
39+
screenControllers
40+
.lookup<DeepLinksController>()
41+
.firstLoadWithDefaultConfigurations();
4342
}
4443

4544
@override

packages/devtools_app/lib/src/screens/deep_link_validation/deep_links_model.dart

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,6 @@ class AASAfileFormatSubCheck extends CommonError {
219219
),
220220
);
221221

222-
static final defaultsCaseSensitiveFormat = AASAfileFormatSubCheck(
223-
'Applinks defaults case sensitive format',
224-
propertyTypeMessage(
225-
property: 'applinks.defaults.caseSensitive',
226-
expectedType: 'boolean',
227-
),
228-
);
229-
230222
static const detailsFormat = AASAfileFormatSubCheck(
231223
'Applinks details format',
232224
'This test checks that the `applinks.details` property is formatted properly. Ref - '
@@ -402,6 +394,7 @@ class Path {
402394
final String path;
403395

404396
// TODO(hangyujin): display queryParams in path table.
397+
// ignore: unused-code, outstanding TODO.
405398
final Map<String, String> queryParams;
406399

407400
/// A Boolean value that indicates whether to stop pattern matching and prevent the universal

packages/devtools_app/lib/src/screens/deep_link_validation/deep_links_screen.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ class DeepLinksScreen extends Screen {
1818

1919
static final id = ScreenMetaData.deepLinks.id;
2020

21-
// TODO(https://github.com/flutter/devtools/issues/6013): write documentation.
22-
// @override
23-
// String get docPageId => id;
21+
@override
22+
String get docPageId => id;
2423

2524
@override
2625
String get docsUrl => 'https://flutter.dev/to/deep-link-tool';

0 commit comments

Comments
 (0)