Here is what I'm trying to do.

```
Here is my ListItems class:

      class ListItems {
      String? title;
      String? text;
      DateTime? selectedDayTime;

      ListItems(
          {required this.title, required this.text, required this.selectedDayTime});
    }

```

In my AddTask class, I'm trying to add some items to my list. Here is my code:

```
    ElevatedButton(
                      onPressed: () {
                        setState(() {
                          itemList.add(
                            ListItems(
                              title: _titleController.text,
                              text: _textController.text,
                              selectedDayTime: _selectedDay,
                            ),
                          );
                          Navigator.pop(context);
                        });
                        print(itemList.length);
                      },
                      child: Text("Add Task"),
                    ),

```

itemList is a List list. However, everytime I try to add new item to my itemList, itemList.length never changes. I dont know why this happening so I need help.