[ package:vm_service ] Mark endTime, lastReadTime, and lastWriteTime as nullable

These properties of `SocketStatistic` were mistakenly marked as
non-nullable but are not always returned as part of the response from
the service extension.

Change-Id: I996d8bdd9ff3b2acd00ce388582042b86fb95301
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237632
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This commit is contained in:
Ben Konyi 2022-03-17 16:47:57 +00:00 committed by Commit Bot
parent 3ebb07c016
commit 400bad7544
3 changed files with 12 additions and 4 deletions

View file

@ -1,5 +1,11 @@
# Changelog
## 8.2.2
- Updated the following optional fields to be nullable in `SocketStatistic`:
- `endTime`
- `lastReadTime`
- `lastWriteTime`
## 8.2.1
- Changed type of `UriList.uris` from `dynamic` to `List<String?>?`.
- Remove `example/vm_service_asserts.dart'

View file

@ -212,13 +212,15 @@ class SocketStatistic {
/// The time, in microseconds, that this socket was closed.
@optional
final int endTime;
final int? endTime;
/// The time, in microseconds, that this socket was last read from.
final int lastReadTime;
@optional
final int? lastReadTime;
/// The time, in microseconds, that this socket was last written to.
final int lastWriteTime;
@optional
final int? lastWriteTime;
/// The address of the socket.
final String address;

View file

@ -3,7 +3,7 @@ description: >-
A library to communicate with a service implementing the Dart VM
service protocol.
version: 8.2.1
version: 8.2.2
homepage: https://github.com/dart-lang/sdk/tree/master/pkg/vm_service