Latest Flutter upgrade causes error: 'DillSetterBuilder' is not a subtype of type 'SourceMemberBuilderImpl?' in type cast

Viewed 1319

Prior to upgrading, everything ran perfectly fine. This is the full error I have received post upgrade:

type 'DillSetterBuilder' is not a subtype of type 'SourceMemberBuilderImpl?' in type cast
#0      SourceLibraryBuilder.checkMemberConflicts.<anonymous closure> (package:front_end/src/fasta/source/source_library_builder.dart:998:22)
#1      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:574:13)
#2      Scope.forEachLocalSetter (package:front_end/src/fasta/scope.dart:424:14)
#3      SourceLibraryBuilder.checkMemberConflicts (package:front_end/src/fasta/source/source_library_builder.dart:974:11)
#4      SourceLibraryBuilder.build (package:front_end/src/fasta/source/source_library_builder.dart:1057:5)
#5      IncrementalCompiler.compileExpression.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:1817:20)
#6      IncrementalCompiler.compileExpression.<anonymous closure> 
[#7-#59...]

the Dart compiler exited unexpectedly.
the Dart compiler exited unexpectedly.
4 Answers

I switched to the stable flutter channel by typing flutter channel stable in the terminal and that worked for me!

If the following command is run in cmd, the problem will be solved.

dart --enable-analytics

I think the program is trying to read data from the server, but the server is not working, so it makes an error. Check that the API is working.

Related