- Freezed 혹은 Json serializable 그 외 annotation을 활용하여 코드 생성하는 경우 특정 함수 혹은 키워드를 사용할 경우 invalid_annotation_target 경고가 나타납니다.
- 대표적으로 json_annotation의 @JsonKey()에서 발생합니다.
1. 프로젝트 전체에 적용하기
- analysis_options.yaml 파일에 아래 내용을 추가합니다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
analyzer: | |
exclude: | |
- "**/*.g.dart" | |
- "**/*.freezed.dart" | |
errors: | |
invalid_annotation_target: ignore |
Reference
'Flutter' 카테고리의 다른 글
WillPopScope이 안된다면?? (PopScope 사용하기) (0) | 2023.08.28 |
---|---|
Flutter - Supported OS (0) | 2023.08.07 |
font_awesome_flutter (다양한 아이콘 사용) (0) | 2023.06.01 |
flutter_launcher_icons (실행 아이콘 설정) (0) | 2023.05.25 |
markdown_widget (마크다운 Renderer) (0) | 2023.05.24 |