Closed offline-first closed 2 years ago
What error are you having?
This builder requires Dart inputs without syntax errors. However, package:test/models/test.dart (or an existing part) contains the following errors. test.dart:11:8: This requires the 'super-parameters' language feature to be enabled.
class BaseTest {
final String id;
BaseTest(this.id);
}
class Test extends BaseTest{
final String title;
Test(super.id, this.title);
}
To enable this feature, just change the line in .../mobx/pubspec.yaml
sdk: '>=2.13.0 <3.0.0'
to
sdk: '>=2.17.0 <3.0.0'
This error is because of the analyzer constraint, it is not related to the dart sdk constraint: https://github.com/mobxjs/mobx.dart/blob/9c4eb1dbd99228cbc11425b59472f6142b3816fd/mobx_codegen/pubspec.yaml#L11
To be exact: people depending on mobx_codegen
are unable to upgrade to dart 2.17. Example of how freezed's pubspec looks like: https://github.com/rrousselGit/freezed/blob/master/packages/freezed/pubspec.yaml. Notice, that analyzer 4.0.0 is allowed in their constraint, unlike mobx_codegen
's constraint.
Please support the new language feature for "super-parameters" sdk ^2.17.0