Error: DatePickerTheme' isn't a function.
Today I am getting an error: 'DatePickerTheme' isn't a function.
Try correcting the name to match an existing function, or define a method or function named 'DatePickerTheme'.

Any solutions? We should wait for fix?
It may seem irrelevant, but when I referenced the package from github, not pubdev, this problem was solved.
It may seem irrelevant, but when I referenced the package from github, not pubdev, this problem was solved.
This didn't work out in my case, I still get the error. I'm referencing the package as such :
flutter_datetime_picker:
git:
url: https://github.com/Realank/flutter_datetime_picker.git
ref: master
It may seem irrelevant, but when I referenced the package from github, not pubdev, this problem was solved.
This didn't work out in my case, I still get the error. I'm referencing the package as such :
flutter_datetime_picker: git: url: https://github.com/Realank/flutter_datetime_picker.git ref: master
I fixed this earlier internally. All I did was to rename the DatePickerTheme being imported from 'package:flutter_datetime_picker/src/datetime_picker_theme.dart' as it's conflicting with Flutter's native DatePickerTheme function. Or you can refer to the fix on this PR that fixes the issue using aliases.
You can try this
Change to this and use dtpicker or any name you want
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart' as dtpicker;
After
dtpicker.DatePicker(...)
or
dtpicker.DatePickerTheme(...)