File tree Expand file tree Collapse file tree 1 file changed +0
-4
lines changed Expand file tree Collapse file tree 1 file changed +0
-4
lines changed Original file line number Diff line number Diff line change 44
55import 'package:analyzer/dart/constant/value.dart' ;
66import 'package:analyzer/dart/element/element.dart' ;
7- import 'package:meta/meta.dart' ;
87
98/// Throws a [FormatException] if [root] does not have a given field [name] .
109///
1110/// Super types [ClassElement.supertype] are also checked before throwing.
12- @visibleForTesting
1311void assertHasField (ClassElement root, String name) {
1412 var element = root;
1513 while (element != null ) {
@@ -28,13 +26,11 @@ void assertHasField(ClassElement root, String name) {
2826}
2927
3028/// Returns whether or not [object] is or represents a `null` value.
31- @visibleForTesting
3229bool isNullLike (DartObject object) => object? .isNull != false ;
3330
3431/// Similar to [DartObject.getField] , but traverses super classes.
3532///
3633/// Returns `null` if ultimately [field] is never found.
37- @visibleForTesting
3834DartObject getFieldRecursive (DartObject object, String field) {
3935 if (isNullLike (object)) {
4036 return null ;
You can’t perform that action at this time.
0 commit comments