Closed xiaozhizhong closed 4 years ago
I have the same problem and I'm using https://github.com/Milad-Akarie/auto_route_library/tree/master/auto_route_generator which requires analyzer ">=0.39.0".
analyzer changelog: https://github.com/dart-lang/sdk/blob/stable/pkg/analyzer/CHANGELOG.md
0.36.1: Deprecated DartType.isUndefined, and now it always returns false.
0.37.0: Removed deprecated getter DartType.isUndefined.
Is it the same as checking DartType.element == null
?
abstract class DartType {
/// Return the element representing the declaration of this type, or `null` if
/// the type has not, or cannot, be associated with an element. The former
/// case will occur if the element model is not yet complete; the latter case
/// will occur if this object represents an undefined type.
Element get element;
...
}
from analyzer 0.35.4:
/**
* Return `true` if this type represents a typename that couldn't be resolved.
*/
bool get isUndefined;
In the codebase, the isUndefined
method is only used from objects of ParameterElement.type
.
Sorry for the delay
Is it the same as checking DartType.element == null?
It doesn't seem so.
The workaround to parse Color
& co no longer works because of it. I'll have to investigate more about it
Fixing it is non-trivial. I'm in the process of rewriting the package to fix that and add support for default/values
I used a workaround which I wrote in the other related issue
I guess this issue is same with https://github.com/rrousselGit/functional_widget/issues/55#issue-502262720, but my sdk is stable channel v1.12.13+hotfix.8
try with: functional_widget_annotation: ^0.5.1 functional_widget: ^0.7.2
when i run the app, error occurs. the output is: `generating build script... 31.9s Exception: Error generating build_script snapshot: ../../../base/flutterSDK/flutter/.pub-cache/hosted/pub.flutter-io.cn/functional_widget-0.7.2/lib/function_to_widget_class.dart:216:43: Error: The getter 'isUndefined' isn't defined for the class 'DartType'.