showDialogPicker method
Implementation
void showDialogPicker(BuildContext context){
selectedDate = showDatePicker(
context: context,
initialDate: DateTime.now(),
firstDate: DateTime(2000),
lastDate: DateTime(2050),
builder: (BuildContext context, Widget? child) {
return Theme(
data: ThemeData.light(),
child: child!,
);
},
);
selectedDate.then((value) {
setState(() {
if(value == null) return;
date = Tools.getFormattedDateSimple(value.millisecondsSinceEpoch);
});
}, onError: (error) {
print(error);
});
}