uninstallFilter method
Uninstall filter Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additionally Filters timeout when they aren't requested with getFilterChanges for a period of time. Filter id Returns true if the filter was successfully uninstalled, otherwise false.
Implementation
Future<bool?> uninstallFilter(int? filterId) async {
if (filterId == null) {
throw ArgumentError.notNull('Ethereum::uninstallFilter - filterId');
}
final params = <String>[EthereumUtilities.intToHex(filterId)];
const method = EthereumRpcMethods.uninstallFilter;
final dynamic res = await _client.rpcClient.request(method, params);
if (res != null && res.containsKey(EthereumConstants.ethResultKey)) {
return res[EthereumConstants.ethResultKey];
}
_client.processError(method, res);
return null;
}