작성
·
439
·
수정됨
1
pubspec.yaml 파일도 수정해보고, 강사님 한대로 코드 똑같이 적었는데.. 이미지가 안불러와져요.
오타 있는지 확인도 해보았는데 없었어요
home_screen.dart
import 'package:flutter/material.dart';
class HomeScreen extends StatefulWidget {
const HomeScreen({super.key});
@override
_HomeScreenState createState() => _HomeScreenState();
}
class _HomeScreenState extends State<HomeScreen> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return const TopBar();
}
}
class TopBar extends StatelessWidget {
const TopBar({super.key});
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.fromLTRB(20, 7, 20, 7),
child: Row(
children: <Widget>[
Image.asset(
'assetsimages\bbongflix_logo.png',
fit: BoxFit.contain,
height: 25,
),
],
),
);
}
}