There appears to be a conflict with the analyzer library being used. No toFunctionValue method... Please advise on how to solve this.
The following error appears when executing the flutter packages pub run build_runner build --delete-conflicting-outputs command:
../../../flutter/.pub-cache/hosted/pub.dartlang.org/source_gen-0.9.4+5/lib/src/constants/revive.dart:22:49: Error: The method 'toFunctionValue' isn't defined for the class 'DartObject'. - 'DartObject' is from 'package:analyzer/dart/constant/value.dart' ('../../../flutter/.pub-cache/hosted/pub.dartlang.org/analyzer-0.36.4/lib/dart/constant/value.dart').Try correcting the name to the name of an existing method, or defining a method named 'toFunctionValue'. final element = object.type.element ?? object.toFunctionValue();
In my case, i solved it by changing the analyzer package version to analyzer: ^0.37.1 on my pubspec.yaml and then run the flutter packages pub run build_runner build --delete-conflicting-outputs command again
There appears to be a conflict with the analyzer library being used. No
toFunctionValue
method... Please advise on how to solve this.The following error appears when executing the
flutter packages pub run build_runner build --delete-conflicting-outputs
command:../../../flutter/.pub-cache/hosted/pub.dartlang.org/source_gen-0.9.4+5/lib/src/constants/revive.dart:22:49: Error: The method 'toFunctionValue' isn't defined for the class 'DartObject'. - 'DartObject' is from 'package:analyzer/dart/constant/value.dart' ('../../../flutter/.pub-cache/hosted/pub.dartlang.org/analyzer-0.36.4/lib/dart/constant/value.dart').Try correcting the name to the name of an existing method, or defining a method named 'toFunctionValue'. final element = object.type.element ?? object.toFunctionValue();