728x90
pubspec.yaml 파일에 이미지 경로를 잘 입력을 했는데도 이미지가 안나오는 경우가 있다.
터미널에뜨는 이슈 사항
변경 전
Image.asset('asset/img/logo.png')
변경 후
Image(image: AssetImage("asset/img/logo.png")
체크사항
- flutter fub get 후에 앱 재시작하기
- 디렉토리 구조와 pubspec.yaml 파일에 작성법이 알맞게 작성이 되었는지 확인하기
출처
https://docs.flutter.dev/development/ui/assets-and-images
Adding assets and images
How to use images (and other assets) in your Flutter app.
docs.flutter.dev
728x90
'⭐️ 개발 > 플러터' 카테고리의 다른 글
[프로젝트] - 출근 기록 (0) | 2022.12.16 |
---|---|
[프로젝트] 영상플레이어 (4) 동영상 위 버튼 올리기 (2) | 2022.12.15 |
[프로젝트] 영상플레이어 (1) HomeScreen 구현하기 (0) | 2022.12.13 |
Optional Function Paramters (2) | 2022.12.08 |
[프로젝트] 랜덤숫자 생성 (0) | 2022.12.07 |