Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
791 B
1
Indexable
Never
final TextEditingController _dateController =
      TextEditingController();
Expanded(
                  child: InkWell(
                      onTap: () => showDatePicker(
                            context: context,
                          ).then((dateTime) {
                            setState(() {
                              var date = DateFormat('yyyy-MM-dd')
                                  .format(dateTime!)
                                  .toString();
                              _dateController.text = date;
                              selectedBirtDate = dateTime;
                            });
                          }),
                      child: TextInput(
                          controller: _dateController,
                      )),
                ),
Leave a Comment