Getting error at compile time
Could you please suggest me what is that issue and how can we solve it?
Below is the error I am getting on console panel of vscode editor:
../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_datetime_picker-1.5.1/lib/flutter_datetime_picker.dart:311:32: Warning: Operand of null-aware operation '??' has type 'Color' which excludes null.
- 'Color' is from 'dart:ui'.
color: theme.backgroundColor ?? Colors.white,
Please suggest. Thanks.
Same error, but still compiles just fine (using unsound null-safety)
I get the same problem.Did you solve it
I Solved it by editing the line no 311 of the flutter_datetime_picker.dart. You can find this file in External Librariers->DartPackages
Thanks. color: theme.backgroundColor ?? Colors.white -> color: theme.backgroundColor
It's just a warning, so no need to worry. It was fixed with this PR https://github.com/Realank/flutter_datetime_picker/pull/236 but apparently didn't make it into the latest deployment.
If you want, pulling from master instead of pub.dev should solve it until a new version is deployed.
flutter_datetime_picker:
git:
url: https://github.com/Realank/flutter_datetime_picker.git
ref: master