Skip to content

Commit 823c59e

Browse files
authored
Fix failing lints (#2548)
1 parent 252e42e commit 823c59e

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

packages/devtools_app/lib/src/extent_delegate_list.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ abstract class FixedExtentDelegateBase extends ExtentDelegate {
8080
// want to query for _offsets(length) to cheaply determine the total size
8181
// of the list. Additionally, the logic for binary search assumes that we
8282
// have one offset past the end of the list.
83-
_offsets = List(length + 1);
83+
_offsets = List.filled(length + 1, 0.0);
8484
double offset = 0;
8585
// The first item in the list is at offset zero.
8686
// TODO(jacobr): remove this line once we have NNBD lists.

packages/devtools_app/lib/src/memory/memory_graph_model.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ HeapGraph convertHeapGraph(
120120

121121
// Construct all the classes in the snapshot.
122122
final List<HeapGraphClassLive> classes =
123-
List<HeapGraphClassLive>(graph.classes.length);
123+
List<HeapGraphClassLive>.filled(graph.classes.length, null);
124124
for (int i = 0; i < graph.classes.length; i++) {
125125
final HeapSnapshotClass c = graph.classes[i];
126126

@@ -148,7 +148,7 @@ HeapGraph convertHeapGraph(
148148

149149
// Pre-allocate the number of objects in the snapshot.
150150
final List<HeapGraphElementLive> elements =
151-
List<HeapGraphElementLive>(graph.objects.length);
151+
List<HeapGraphElementLive>.filled(graph.objects.length, null);
152152

153153
// Construct all objects.
154154
for (int i = 0; i < graph.objects.length; i++) {
@@ -188,7 +188,8 @@ HeapGraph convertHeapGraph(
188188
final snapshotExternals = graph.externalProperties;
189189

190190
// Pre-allocate the number of external objects in the snapshot.
191-
final externals = List<HeapGraphExternalLive>(snapshotExternals.length);
191+
final externals =
192+
List<HeapGraphExternalLive>.filled(snapshotExternals.length, null);
192193

193194
// Construct all external objects and link to its live element.
194195
for (int index = 0; index < snapshotExternals.length; index++) {

packages/devtools_app/lib/src/scaffold.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ class DevToolsScaffoldState extends State<DevToolsScaffold>
293293
),
294294
];
295295

296+
// TODO(issues/2547) - Remove.
297+
// ignore: deprecated_member_use
296298
return ValueListenableProvider.value(
297299
value: _currentScreen,
298300
child: Provider<BannerMessagesController>(

0 commit comments

Comments
 (0)