📝

【Flutter】Super.key と Key key の違い

2023/07/19に公開

super.keyは新しい構文であり、(Key? key) : super(key: key)に比べて少ないコードで表現できるため、推奨される。

super.key is the new syntax, made available in Dart 2.17, which first came with Flutter 3.0. Details are at the release notes: https://dart.dev/guides/whats-new#may-11-2022-217-release
The new syntax is much shorter and cleaner, but you'll need to understand both forms for years to come.

https://stackoverflow.com/a/73767149

Discussion