How to add items to a List with multiple objects?

I want to create a Weight Diary, where the user can add his weight with the day to a List. So I created a class and a List to save the weight with the day like this:

class WeightData {
  final DateTime date;
  final double weight;

  const WeightData({
    this.date,
    this.weight,
  });
}

List<WeightData> weights = [
  WeightData(date: DateTime.now(), weight: 56),
  WeightData(date: DateTime.now(), weight: 55.5),
];

Now I want that the user can dynamically add new weights, but I dont know how. My Code looks like this so far:

class WeightScreen extends StatefulWidget {
  const WeightScreen({Key key}) : super(key: key);

  @override
  _WeightScreenState createState() => _WeightScreenState();
}

class _WeightScreenState extends State<WeightScreen> {
  final _formKey = GlobalKey<FormState>();
  DateTime _date = DateTime.now();
  TextEditingController _weightController = TextEditingController();
  TextEditingController _dateController = TextEditingController();

  _handleDatePicker() async {
    final DateTime date = await showDatePicker(
        context: context,
        initialDate: _date,
        firstDate: DateTime(2000),
        lastDate: DateTime(2200)
    );
    if (date != 0 && date != _date) {
      setState(() {
        _date = date;
      });
      _dateController.text = _date.toString();
    }
}

  void newEntry() {
    showDialog(
        context: context,
        builder: (BuildContext context) {
          return AlertDialog(
            content: Form(
                key: _formKey,
                child: Column(
                  children: [
                    Text('Add new Weight'),
                    /// Here I want that the user can add every Day his weight and the date

                    TextFormField(
                      controller: _dateController,
                      validator: (input) =>
                          input.trim().isEmpty ? 'Please enter Day' : null,
                      onTap: _handleDatePicker,
                    ),
                    TextFormField(
                      keyboardType: TextInputType.number,
                      controller: _weightController,
                      validator: (input) =>
                          input.trim().isEmpty ? 'Please enter Weight' : null,
                      /// onSaved: dont know what to do here
                    ),
                    ElevatedButton(
                      onPressed: () {
                        if (_formKey.currentState.validate()) {
                          weights.insert(0,
                           WeightData(///date: add Date, weight: add Weight
                             ),
                          );
                        }
                        Navigator.of(context).pop();
                        setState(() {});
                      },
                      child: Text('Submit'),
                    ),
                  ],
                )),
          );
        });
  }

Because there are two entrys to make (day and weight) I dont know how to add this two objects (is this the right word?) to the list. It would be awesome if someone know how to do this :slight_smile: