flutter-intellij
flutter-intellij copied to clipboard
Use super params in macro-generated code
The stless and friends macros should generate code that uses the new super param feature if it is available. Super parameters are available when the lower SDK bound of the package is at least 2.17.0-0.
The stless macro should for example generate the following code:
class Foo extends StatelessWidget {
const Foo({super.key});
@override
Widget build(BuildContext context) {
return Container();
}
}
More about super parameters: https://github.com/dart-lang/language/issues/1855 Tracking issue for the flutter framework: https://github.com/flutter/flutter/issues/100575 Same request for Dart Code: https://github.com/Dart-Code/Dart-Code/issues/3899
We're going to see about moving support for this into the analyzer.