Suggestion: case-sensitive imports
我的文件是'layout/flex_list.dart';
我的import 是'layout/Flex_List.dart';
这时inheritWidget里的获取方法会有如下结果:
xxx is targetType = true
_inheritedWidgets[targetType] = null;
_inheritedWidgets[xxx] != null
@override
InheritedWidget inheritFromWidgetOfExactType(Type targetType, { Object aspect }) {
assert(_debugCheckStateIsActiveForAncestorLookup());
final InheritedElement ancestor = _inheritedWidgets == null ? null : _inheritedWidgets[targetType];
if (ancestor != null) {
assert(ancestor is InheritedElement);
return inheritFromElement(ancestor, aspect: aspect);
}
_hadUnsatisfiedDependencies = true;
return null;
}