I want to prohobit the usage of Iterable<Future<T>>'s wait getter, but can't seem to find a way to match it. Here is the definition in dart:async:
extension FutureIterable<T> on Iterable<Future<T>> {
Future<List<T>> get wait { /* ... */ }
}
I tried:
custom_lint:
rules:
- avoid_using_api:
severity: info
entries:
- class_name: FutureIterable<T> // but also FutureIterable<dynamic, FutureIterable, Iterable, Iterable<Future>, Iterable<Future<dynamic>>, Iterable<Future<T>>
identifier: wait
source: dart:async
reason: "Iterable.wait should be avoided because it loses type
safety for the results. Use a Record's `wait` method
instead."
severity: warning
but to no success. Without specifiying the class_name works but does match the (f1,f2).wait getter method I don't want to match.
I want to prohobit the usage of
Iterable<Future<T>>
'swait
getter, but can't seem to find a way to match it. Here is the definition in dart:async:I tried:
but to no success. Without specifiying the
class_name
works but does match the(f1,f2).wait
getter method I don't want to match.