

안녕하세요 movie review 과제중 body에 검색창 밑 영화이미지 리스트를 넣으려고 하는 중입니다.
body에 column의 children으로 padding 다음에 listview.builder를 넣고싶은 데 이렇게 하면 안되는 건가요?
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@overrideWidget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: HomePage(), // 홈페이지 보여주기
);
}
}
class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key);
@overrideWidget 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(
elevation: 0,
centerTitle: false,
backgroundColor: Colors.white,
actions: <Widget>[
IconButton(
icon: Icon(
Icons.perm_identity,
color: Colors.black,
),
onPressed: () {},
)
],
title: Text(
"Movie Reviews",
style: TextStyle(
fontSize: 28, color: Colors.black, fontWeight: FontWeight.bold),
)),
body: Column(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: TextField(
decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Color.fromARGB(255, 176, 174, 174), width: 1.0),
),
labelText: ' 영화 제목을 검색해주세요.',
suffixIcon: Icon(Icons.search),
),),),],),
ListView.builder(itemCount: 6,itemBuilder: (BuildContext context, int (context, index) {return postContainer(););
Too many positional arguments: 0 expected, but 1 found.
Try removing the extra positional arguments, or specifying the name for named arguments.
The argument type 'Type' can't be assigned to the parameter type 'Widget? Function(BuildContext, int)'.
