title: Named parameter required, but there's no corresponding argument. What should I do?
body: <p>I've been getting the following related errors at my Flutter application:</p>
  <blockquote>
  <p>The named parameter 'description' is required, but there's no
  corresponding argument. Try adding the required argument.</p>
  <p>The named parameter 'id' is required, but there's no corresponding
  argument. Try adding the required argument.</p>
  </blockquote>
  <p>I am receiving this errors at:</p>
  <pre><code>Task _newTask = Task(title: value);
  </code></pre>
  <p>Here is my <strong>taskpage.dart</strong></p>
  <pre><code>    // ignore_for_file: prefer_const_constructors
  
  import 'package:flutter/material.dart';
  import 'package:flutter_to_do/database_helper.dart';
  import 'package:flutter_to_do/models/task.dart';
  import 'package:flutter_to_do/models/todo.dart';
  import 'package:flutter_to_do/widgets.dart';
  
  class Taskpage extends StatefulWidget {
    final Task task;
  
    Taskpage({required this.task});
  
    @override
    _TaskpageState createState() =&gt; _TaskpageState();
  }
  
  class _TaskpageState extends State&lt;Taskpage&gt; {
    DatabaseHelper _dbHelper = DatabaseHelper();
  
    int _taskId = 0;
    String _taskTitle = &quot;&quot;;
    String _taskDescription = &quot;&quot;;
  
    late FocusNode _titleFocus;
    late FocusNode _descriptionFocus;
    late FocusNode _todoFocus;
  
    bool _contentVisile = false;
  
    @override
    void initState() {
      if (widget.task != null) {
        // Set visibility to true
        _contentVisile = true;
  
        _taskTitle = widget.task.title;
        _taskDescription = widget.task.description;
        _taskId = widget.task.id;
      }
  
      _titleFocus = FocusNode();
      _descriptionFocus = FocusNode();
      _todoFocus = FocusNode();
  
      super.initState();
    }
  
    @override
    void dispose() {
      _titleFocus.dispose();
      _descriptionFocus.dispose();
      _todoFocus.dispose();
  
      super.dispose();
    }
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        body: SafeArea(
          child: Container(
            child: Stack(
              children: [
                Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Padding(
                      padding: EdgeInsets.only(
                        top: 24.0,
                        bottom: 6.0,
                      ),
                      child: Row(
                        children: [
                          InkWell(
                            onTap: () {
                              Navigator.pop(context);
                            },
                            child: Padding(
                              padding: const EdgeInsets.all(24.0),
                              child: Image(
                                image: AssetImage(
                                    'assets/images/back_arrow_icon.png'),
                              ),
                            ),
                          ),
                          Expanded(
                            child: TextField(
                              focusNode: _titleFocus,
                              onSubmitted: (value) async {
                                // Check if the field is not empty
                                if (value != &quot;&quot;) {
                                  // Check if the task is null
                                  if (widget.task == null) {
                                    Task _newTask = Task(title: value);
                                    _taskId =
                                        await _dbHelper.insertTask(_newTask);
                                    setState(() {
                                      _contentVisile = true;
                                      _taskTitle = value;
                                    });
                                  } else {
                                    await _dbHelper.updateTaskTitle(
                                        _taskId, value);
                                    print(&quot;Task Updated&quot;);
                                  }
                                  _descriptionFocus.requestFocus();
                                }
                              },
                              controller: TextEditingController()
                                ..text = _taskTitle,
                              // ignore: prefer_const_constructors
                              decoration: InputDecoration(
                                hintText: &quot;Enter Task Title&quot;,
                                border: InputBorder.none,
                              ),
                              style: TextStyle(
                                fontSize: 26.0,
                                fontWeight: FontWeight.bold,
                                color: Color(0xFF211551),
                              ),
                            ),
                          )
                        ],
                      ),
                    ),
                    Visibility(
                      visible: _contentVisile,
                      child: Padding(
                        padding: EdgeInsets.only(
                          bottom: 12.0,
                        ),
                        child: TextField(
                          focusNode: _descriptionFocus,
                          onSubmitted: (value) async {
                            if (value != &quot;&quot;) {
                              if (_taskId != 0) {
                                await _dbHelper.updateTaskDescription(
                                    _taskId, value);
                                _taskDescription = value;
                              }
                            }
                            _todoFocus.requestFocus();
                          },
                          controller: TextEditingController()
                            ..text = _taskDescription,
                          decoration: InputDecoration(
                            hintText: &quot;Enter Description for the task...&quot;,
                            border: InputBorder.none,
                            contentPadding: EdgeInsets.symmetric(
                              horizontal: 24.0,
                            ),
                          ),
                        ),
                      ),
                    ),
                    Visibility(
                      visible: _contentVisile,
                      child: FutureBuilder(
                        initialData: [],
                        future: _dbHelper.getTodo(_taskId),
                        builder: (context, AsyncSnapshot snapshot) {
                          return Expanded(
                            child: ListView.builder(
                              itemCount: snapshot.data.length,
                              itemBuilder: (context, index) {
                                return GestureDetector(
                                  onTap: () async {
                                    if (snapshot.data[index].isDone == 0) {
                                      await _dbHelper.updateTodoDone(
                                          snapshot.data[index].id, 1);
                                    } else {
                                      await _dbHelper.updateTodoDone(
                                          snapshot.data[index].id, 0);
                                    }
                                    setState(() {});
                                  },
                                  child: TodoWidget(
                                    text: snapshot.data[index].title,
                                    isDone: snapshot.data[index].isDone == 0
                                        ? false
                                        : true,
                                  ),
                                );
                              },
                            ),
                          );
                        },
                      ),
                    ),
                    Visibility(
                      visible: _contentVisile,
                      child: Padding(
                        padding: EdgeInsets.symmetric(
                          horizontal: 24.0,
                        ),
                        child: Row(
                          children: [
                            Container(
                              width: 20.0,
                              height: 20.0,
                              margin: EdgeInsets.only(
                                right: 12.0,
                              ),
                              decoration: BoxDecoration(
                                  color: Colors.transparent,
                                  borderRadius: BorderRadius.circular(6.0),
                                  border: Border.all(
                                      color: Color(0xFF86829D), width: 1.5)),
                              child: Image(
                                image: AssetImage('assets/images/check_icon.png'),
                              ),
                            ),
                            Expanded(
                              child: TextField(
                                focusNode: _todoFocus,
                                controller: TextEditingController()..text = &quot;&quot;,
                                onSubmitted: (value) async {
                                  // Check if the field is not empty
                                  if (value != &quot;&quot;) {
                                    if (_taskId != 0) {
                                      DatabaseHelper _dbHelper = DatabaseHelper();
                                      Todo _newTodo = Todo(
                                        title: value,
                                        isDone: 0,
                                        taskId: _taskId,
                                      );
                                      await _dbHelper.insertTodo(_newTodo);
                                      setState(() {});
                                      _todoFocus.requestFocus();
                                    } else {
                                      print(&quot;Task doesn't exist&quot;);
                                    }
                                  }
                                },
                                decoration: InputDecoration(
                                  hintText: &quot;Enter Todo item...&quot;,
                                  border: InputBorder.none,
                                ),
                              ),
                            ),
                          ],
                        ),
                      ),
                    )
                  ],
                ),
                Visibility(
                  visible: _contentVisile,
                  child: Positioned(
                    bottom: 24.0,
                    right: 24.0,
                    child: GestureDetector(
                      onTap: () async {
                        if (_taskId != 0) {
                          await _dbHelper.deleteTask(_taskId);
                          Navigator.pop(context);
                        }
                      },
                      child: Container(
                        width: 60.0,
                        height: 60.0,
                        decoration: BoxDecoration(
                          color: Color(0xFFFE3577),
                          borderRadius: BorderRadius.circular(20.0),
                        ),
                        child: Image(
                          image: AssetImage(
                            &quot;assets/images/delete_icon.png&quot;,
                          ),
                        ),
                      ),
                    ),
                  ),
                )
              ],
            ),
          ),
        ),
      );
    }
  }
  </code></pre>
  <p>here it is my <strong>task.dart</strong></p>
  <pre><code>class Task {
    final int id;
    final String title;
    final String description;
    Task({required this.id, required this.title, required this.description});
  
    Map&lt;String, dynamic&gt; toMap() {
      return {
        'id': id,
        'title': title,
        'description': description,
      };
    }
  }
  </code></pre>
  <p>What can I do to solve this issue? I tried to use</p>
  <blockquote>
  <p>final String? description</p>
  </blockquote>
  <p>and remove the <em>required</em> command, but it gave different errors.</p>