title: Flutter screen not refreshing after updating sqflite
body: <p>I am new to flutter and I am  trying sqflite. When updating database the screen not refreshing. I tried setState but not working. After hot reloading in vs code, values are changing, but when  updating automatically not refreshing. Please help with best solution.</p>
  <pre><code>class _UpdateStudentsState extends State&lt;UpdateStudents&gt; {
    DateTime? dateTime;
   @override
    Widget build(BuildContext context) {
      final _nameUpdateController = TextEditingController(text: widget.name);
      final _addressUpdateController =
          TextEditingController(text: widget.address);
      final _mobileUpdateController = TextEditingController(text: widget.phone);
      final _emailUpdateController = TextEditingController(text: widget.email);
      return Scaffold(
        appBar: AppBar(
          title:Text('Update Student'),
        ),
        body: Padding(
          padding:EdgeInsets.all(10.0),
          child: SingleChildScrollView(
              child: Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    TextFormField(
                      controller: _nameUpdateController,
                    ),DateOfBirth(
                      onSelectedDate: (date) {
                        dateTime = date;
                      },
                    ),
                    TextFormField(
                  controller: _addressUpdateController,
                    ),TextFormField(
                    controller: _mobileUpdateController,
                      ),
                    ),TextFormField(
                     controller: _emailUpdateController,
                    ),SizedBox(
                      child: ElevatedButton(
                        child:Text('Update'),
                        onPressed: () { setState(
                            () {
                              DataBaseHelper.instance.updateStudent(
                                StudentDetails(
                                  name: _nameUpdateController.text,
                                  dob:
                                      '${dateTime!.day}/${dateTime!.month}/${dateTime!.year}',
                                  address: _addressUpdateController.text,
                                  phone: _mobileUpdateController.text,
                                  email: _emailUpdateController.text,
                                  id: widget.id,
                                ),
                              );
                              Navigator.of(context).pop();
                            },
                          );
                        },
                      ),
                    ),
                  ],
                ),
              ),
            ), 
      );
    }
  }
  </code></pre>