getDynamicRules method
Returns the current set of dynamic rules for the extension. Callers can
optionally filter the list of fetched rules by specifying a
filter
.
|filter|: An object to filter the list of fetched rules.
|callback|: Called with the set of dynamic rules. An error might be
raised in case of transient internal errors.
Implementation
Future<List<Rule>> getDynamicRules(GetRulesFilter? filter) async {
var $res = await promiseToFuture<JSArray>(
$js.chrome.declarativeNetRequest.getDynamicRules(filter?.toJS));
return $res.toDart.cast<$js.Rule>().map((e) => Rule.fromJS(e)).toList();
}