prefer-both-inlining-annotations
Warns when a @pragma('vm:prefer-inline')
annotation does not have a corresponding @pragma('dart2js:tryInline')
annotation.
info
Enable this rule only if you compile your code to JS and use inlining annotations.
Example
❌ Bad:
// LINT: Missing a 'dart2js:tryInline' annotation. Consider adding it.
('vm:prefer-inline')
Future<String> bad() {
return Future.value('hello');
}
✅ Good:
('dart2js:tryInline')
('vm:prefer-inline')
Future<void> good() async {
return Future.value('hello');
}