Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,15 @@ class ClassFilter {

ClassFilter.empty()
: this(
filterType: ClassFilterType.showAll,
except: '${ClassType.runtime.alias}\n${ClassType.sdk.alias}',
filterType: ClassFilterType.except,
except: defaultExceptString,
only: null,
);

@visibleForTesting
static final defaultExceptString =
'${ClassType.runtime.alias}\n${ClassType.sdk.alias}';

static String _trimByLine(String value) =>
value.split('\n').map((e) => e.trim()).join('\n');

Expand Down
4 changes: 2 additions & 2 deletions packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ in deeply nested trees - [#5181](https://github.com/flutter/devtools/pull/5181)
* Add the ability to filter by method name or source URI - [#5204](https://github.com/flutter/devtools/pull/5204)

## Memory updates
TODO: Remove this section if there are not any general updates.
* Change filter default to show only project and 3rd party dependencies [#5201](https://github.com/flutter/devtools/pull/5201).

## Debugger updates
* Added support for browser navigation history when navigating using the `File Explorer` [#4906](https://github.com/flutter/devtools/pull/4906).
* Add support for browser navigation history when navigating using the `File Explorer` [#4906](https://github.com/flutter/devtools/pull/4906).

## Network profiler updates
TODO: Remove this section if there are not any general updates.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,13 @@ void main() {

// Reset to default.
await tester.tap(find.text('Reset to default'));
await _checkFilterGolden(ClassFilterType.showAll, tester);

// Close dialog.
await tester.pumpAndSettle();
await tester.tap(find.text('APPLY'));
await _checkDataGolden(ClassFilterType.showAll, tester, test);
await tester.pumpAndSettle();

final actualFilter = scene.diffController.core.classFilter.value;
expect(actualFilter.filterType, equals(ClassFilterType.except));
expect(actualFilter.except, equals(ClassFilter.defaultExceptString));
});
}
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import 'package:devtools_app/devtools_app.dart';
import 'package:devtools_app/src/screens/memory/panes/diff/controller/diff_pane_controller.dart';
import 'package:devtools_app/src/screens/memory/shared/heap/class_filter.dart';
import 'package:devtools_app/src/screens/memory/shared/heap/model.dart';
import 'package:devtools_app/src/shared/config_specific/import_export/import_export.dart';
import 'package:devtools_app/src/shared/memory/adapted_heap_data.dart';
Expand Down Expand Up @@ -66,8 +67,12 @@ class MemoryDefaultScene extends Scene {
);
setGlobal(ServiceConnectionManager, fakeServiceManager);

final diffController = DiffPaneController(_TestSnapshotTaker());
diffController.applyFilter(
ClassFilter(filterType: ClassFilterType.showAll, except: '', only: ''),
);
controller = MemoryController(
diffPaneController: DiffPaneController(_TestSnapshotTaker()),
diffPaneController: diffController,
)
..offline = true
..memoryTimeline.offlineData.clear()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import 'package:devtools_app/src/screens/memory/panes/diff/controller/diff_pane_controller.dart';
import 'package:devtools_app/src/screens/memory/panes/diff/diff_pane.dart';
import 'package:devtools_app/src/screens/memory/shared/heap/class_filter.dart';
import 'package:devtools_app/src/screens/memory/shared/heap/model.dart';
import 'package:devtools_app/src/service/service_manager.dart';
import 'package:devtools_app/src/shared/config_specific/ide_theme/ide_theme.dart';
Expand Down Expand Up @@ -48,6 +49,9 @@ class DiffSnapshotScene extends Scene {
setGlobal(ServiceConnectionManager, fakeServiceManager);

diffController = DiffPaneController(_TestSnapshotTaker());
diffController.applyFilter(
ClassFilter(filterType: ClassFilterType.showAll, except: '', only: ''),
);

await diffController.takeSnapshot();
await diffController.takeSnapshot();
Expand Down