파일트리에 'assets'폴더 추가하기(꼭 이름 다르면 절대로 안됨)
pubspec.yaml 파일로 들어가서
assets:
- assets/
추가하기 띄워쓰기 주의해야합니다.
flutter:
assets:
- assets/
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Image.asset('assets/doge.jpg'),
);
}
요로콤 접근이 가능하다.