zubairehman / flutter_boilerplate_project

A boilerplate project created in flutter using MobX and Provider.
http://zubairehman.surge.sh/
MIT License
2.29k stars 911 forks source link

Conflict with analyzer library #22

Closed fegasa12 closed 5 years ago

fegasa12 commented 5 years ago

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();

stefanuscc commented 5 years ago

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