76 | 76 | class ConsoleService extends Disposer { | |
77 | void appendBrowsableInstance({ | ||
78 | required InstanceRef? instanceRef, | ||
79 | required IsolateRef? isolateRef, |
When will we have a null isolate?
It is nullable for consistency with other methods in this class. May be we should refactor/review the code to deal better with nullability of IsolateRef and define right places to bung it.
129 | |||
130 | return (instances.instances ?? []).firstWhereOrNull( | ||
131 | (i) => i is InstanceRef && i.identityHashCode == object.code, | ||
132 | ) as InstanceRef?; |
I think you can remove this cast if you explicitly define the type parameter for the empty list as InstanceRef
.
nope, because instances returns list of ObjRef
17 | 17 | ||
18 | VariableSelectionControls _selectionControls({ | ||
19 | required DartObjectNode variable, | ||
20 | required Function(TextSelectionDelegate delegate)? onInspect, |
Nit: consider making this optional.
I want it to be explicitly specified even when it is null.
327 | 327 | final refLimitTitle = 'Limit for number of requested live instances.'; | |
328 | 328 | final refLimit = ValueNotifier<int>(_defaultRefLimit); | |
329 | static const _defaultRefLimit = 100; | ||
329 | static const _defaultRefLimit = 100000; |
Does this correspond to a maximum number of VM service objects that can be requested / tracked? If so, there's a good chance service IDs will expire before you hit this limit.
It is parameter, passed to getInstances at the moment. It seems we will not need it as soon as we will start using getInstancesAsArray.
DBC: we should make sure that the tree view can be traversed with arrow keys to give the best UX here. Not sure if we already support this or not, but we do support this for the tree table so we might be able to steal some of that logic to implement if the tree view does not support this already.
Login to write a write a comment.
RELEASE_NOTE_EXCEPTION=[behind flag]
Screen.Recording.2023-02-13.at.1.34.08.PM.mov