'Too many positional argument on ListView

I'm writing the test code of the ListView. Though I specified the name of parameters explicitly, I got the error message, 'Too many positional arguments: 0 expected, but 2 found'. Any suggestion to solve this?

Thanks in advance.

@override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: const Text('File Example'),
        ),
        body: Center(
            child: Column(
                ListView.builder(
                    itemCount: (this.ideaCount == null) ? 0 : this.ideaCount,
                    itemBuilder: (BuildContext context, int position) {
                      return Card(
                        color: Colors.white,
                        elevation: 2.0,
                        child: ListTile(
                          title: Text(ideaList[position].name),
                          subtitle: Text(ideaList[position].memo),
                        )
                      );
                    }),
                GestureDetector(
                    onLongPress: () async {
                      print("Long Press");
                      result = await record.hasPermission();
                      if (result) {
                        var dir = await getApplicationDocumentsDirectory();
                        print("############");
                        print(dir.path);
                        DateTime now = DateTime.now();
                        recordDate = '$now';
                        await record.start(
                          path: dir.path + recordDate! + '.aac',
                          encoder: AudioEncoder.AAC,
                          bitRate: 128000,
                          samplingRate: 44100,
                        );
                      } else {
                        print('##########Not Allowed!!!!!');
                      }
                    },
                    onLongPressUp: () async {
                      print("Long Press Stop");
                      record.stop();
                      Idea idea = Idea(1, recordDate!, 'test');
                      helper.insertIdea(idea);
                      setState(() {
                        showData();
                      });
                    },
                    child: ElevatedButton(
                        onPressed: () {}, child: Icon(Icons.mic))))));
  }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source