EDIT: This is a divergence between the analyzer and the compiler that happens on Dart 2.6 and (in rare cases?) on Dart 2.5. See minimal repro that doesn't depend on anything but dart:core below.
Some more information on this: Here is the const constructor being called. All of entries in the list literal are simple constant constructors defined in this file.
I might be overlooking something, but I believe that this is an issue in the analyzer because
it was introduced in Dart 2.5, and the changelog contains no entry that could affect how that code is evaluated
It only affects some users
Most times the error goes away after typing around in the generated file referenced in the issue description
Some users (me included) hit this issue, but I never managed to consistently reproduce it - the error always went away after restarting the analysis server or typing in the affected file. @rebaz94 said that restarting the analysis server did not fix the problem. We discussed this problem in simolus3/moor#154