getTargets method
Retrieves a list of available targets.
filter
Only targets matching filter will be reported. If filter is not specified
and target discovery is currently enabled, a filter used for target discovery
is used for consistency.
Returns: The list of targets.
Implementation
Future<List<TargetInfo>> getTargets({TargetFilter? filter}) async {
var result = await _client.send('Target.getTargets', {
if (filter != null) 'filter': filter,
});
return (result['targetInfos'] as List)
.map((e) => TargetInfo.fromJson(e as Map<String, dynamic>))
.toList();
}