This error no longer occurs with the new version of the Dark SDK. Possibly related discussions:https://github.com/dart-lang/sdk/issues/60161
Problematic dart sdk version 3.6.0.
3.7.2 is ok