
안녕하세요.
linter rules 중 use key in widget constructors 관련 질문입니다.
수업 중에는 생성 시 지워버리는 라인이고 linter rules에서도 없애면 상관없는 것은 알고 있습니다.
그런데, 가장 먼저 의미를 좀 알고 싶습니다.
https://dart-lang.github.io/linter/lints/use_key_in_widget_constructors.html
두 번째로 Android Studio에서는 위젯 생성 시 위 위의 제안과 같이 코드를 아래처럼 수정할 경우
super에 빨간 줄이 그어지면서 super can't be used as an identifier because it's a keyword. 라는 에러와 함께 진행되지 않습니다.
VS Code에서는 또 해당 내용이 문제가 없습니다.
감사합니다.
class MyPublicWidget extends StatelessWidget {
MyPublicWidget({super.key});
}
