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({,

List<WeightData> weights = [
  WeightData(date:, weight: 56),
  WeightData(date:, 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);

  _WeightScreenState createState() => _WeightScreenState();

class _WeightScreenState extends State<WeightScreen> {
  final _formKey = GlobalKey<FormState>();
  DateTime _date =;
  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() {
        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

                      controller: _dateController,
                      validator: (input) =>
                          input.trim().isEmpty ? 'Please enter Day' : null,
                      onTap: _handleDatePicker,
                      keyboardType: TextInputType.number,
                      controller: _weightController,
                      validator: (input) =>
                          input.trim().isEmpty ? 'Please enter Weight' : null,
                      /// onSaved: dont know what to do here
                      onPressed: () {
                        if (_formKey.currentState.validate()) {
                           WeightData(///date: add Date, weight: add Weight
                        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: