@@ -63,7 +63,7 @@ class NetworkService {
6363 /// Force refreshes the HTTP requests logged to the timeline as well as any
6464 /// recorded Socket traffic.
6565 ///
66- /// This method calls ` cancelledCallback` after each async gap to ensure that
66+ /// This method calls [ cancelledCallback] after each async gap to ensure that
6767 /// this operation has not been cancelled during the async gap.
6868 Future <void > refreshNetworkData ({
6969 DebounceCancelledCallback ? cancelledCallback,
@@ -149,19 +149,17 @@ class NetworkService {
149149
150150 // TODO(https://github.com/flutter/devtools/issues/5057):
151151 // Filter lastrefreshMicros inside [service.getSocketProfile] instead.
152- return sockets
153- .where (
154- (element) =>
155- element.startTime >
156- networkController.lastSocketDataRefreshMicros ||
157- (element.endTime ?? 0 ) >
158- networkController.lastSocketDataRefreshMicros ||
159- (element.lastReadTime ?? 0 ) >
160- networkController.lastSocketDataRefreshMicros ||
161- (element.lastWriteTime ?? 0 ) >
162- networkController.lastSocketDataRefreshMicros,
163- )
164- .toList ();
152+ final lastSocketDataRefreshMicros =
153+ networkController.lastSocketDataRefreshMicros;
154+ return [
155+ ...sockets.where (
156+ (element) =>
157+ element.startTime > lastSocketDataRefreshMicros ||
158+ (element.endTime ?? 0 ) > lastSocketDataRefreshMicros ||
159+ (element.lastReadTime ?? 0 ) > lastSocketDataRefreshMicros ||
160+ (element.lastWriteTime ?? 0 ) > lastSocketDataRefreshMicros,
161+ ),
162+ ];
165163 }
166164
167165 Future <void > _clearSocketProfile () async {
0 commit comments