flutter_datetime_picker
flutter_datetime_picker copied to clipboard
null-safe error
It is not null-safe
../../Library/Developer/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,
[✓] Flutter (Channel stable, 2.2.0, on macOS 11.3.1 20E241 darwin-x64, locale en-GB) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [✓] Xcode - develop for iOS and macOS [✓] Chrome - develop for the web [✓] Android Studio (version 4.2) [✓] Connected device (2 available)
mine too, 1.5.1 version.
yes with me here :
../../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,
^
Until the update is pushed, the following is a workaround.
flutter_datetime_picker:
git:
url: https://github.com/AlexHartford/flutter_datetime_picker.git
ref: master
ty @AlexHartford for the workaround I'll keep checking until the update fixes the null safety error
me too in 1.5.1
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,
^
@AlexHartford thanks for workaround
Duplicate of #239
Waiting for this to be pushed to pub.dev since I am using a package that indirectly depends on this one.
Due to author inactivity, I made a fork here https://pub.dev/packages/flutter_datetime_picker_bdaya https://github.com/Bdaya-Dev/flutter_datetime_picker
Feel free to create PRs and file issues until the original author is back