
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
어디서부터 잘못된 건지 에러 메세지를 봐도 모르겠네요 ㅠㅠ
Style 에서 뭔가 빠뜨린게 있는 것 같아요..근데 뭐가 잘못 입력되었는진 잘 모르겠네요.
Help..plz
보고 계신 화면 전체를 캡처해 주시면, 튜터님들이 빠르게 상황을 이해할 수 있어요.
작성한 코드 및 에러 메세지
오류 발생 시, 작성한 코드 전체와 에러 메시지를 첨부해 주세요.
Tip 1) </> 아이콘을 눌러 코드박스를 만들어 보세요.
Tip 2) Ctrl+A(맥의 경우 Command+A) 단축키로 코드를 한 번에 선택할 수 있어요!
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: HomePage(), //홈페이지 보여주기
);
}
}
class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
// 영화 타이틀, 사진 데이터
List<Map<String, dynamic>> dataList = [
{
"category": "탑건: 매버릭",
"imgUrl": "https://i.ibb.co/sR32PN3/topgun.jpg",
},
{
"category": "마녀2",
"imgUrl": "https://i.ibb.co/CKMrv91/The-Witch.jpg",
},
{
"category": "범죄도시2",
"imgUrl": "https://i.ibb.co/2czdVdm/The-Outlaws.jpg",
},
{
"category": "헤어질 결심",
"imgUrl": "https://i.ibb.co/gM394CV/Decision-to-Leave.jpg",
},
{
"category": "브로커",
"imgUrl": "https://i.ibb.co/MSy1XNB/broker.jpg",
},
{
"category": "문폴",
"imgUrl": "https://i.ibb.co/4JYHHtc/Moonfall.jpg",
},
];
// 화면에 보이는 영역
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.white,
elevation: 0.0,
leading: IconButton(
icon: Icon(Icons.menu),
color: Colors.black,
onPressed: () {
print('menu button is clicked');
},
),
actions: [
IconButton(
icon: Icon(Icons.people_alt_rounded),
color: Colors.black,
onPressed: () {
print('search button is clicked');
},
),
],
title: Text(
"Movie Reviews"
style: TextStyle(
fontSize: 28, fontWeight: FontWeight.bold, color: Colors.black,
),
),
),
body: Column(
children: [
Container(
margin: EdgeInsets.all(20.0),
child: TextField(
decoration: InputDecoration(
hintText: "영화 제목을 검색해주세요.",
hintStyle: TextStyle(
color: const Color.fromARGB(255, 156, 156, 156),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(
width: 1,
color: const Color.fromARGB(255, 103, 103, 103)),
),
//suffixIcon개념은 가이드에 왜 추가 안.하.셨.나.요.?
suffixIcon: IconButton(
onPressed: () {},
icon: Icon(Icons.search),
),
),
),
),
], //children
),
);
} //override
}
분명 코딩 순서를 정리하는 과정에서 오류가 난 것 같은데..
서툴다보니까 오류 메세지를 보고 검토해도 왜 문제가 생긴건지 모르겠네요.
명쾌한 해설 풀이 부탁드려요 ㅠㅠ
현재 발생한 오류 메세지

