flutter_datetime_picker icon indicating copy to clipboard operation
flutter_datetime_picker copied to clipboard

null-safe error

Open piotritagsolutions opened this issue 3 years ago • 8 comments

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)

piotritagsolutions avatar May 20 '21 13:05 piotritagsolutions

mine too, 1.5.1 version.

freeala avatar May 24 '21 14:05 freeala

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,         
                               ^                                        

mustafa-707 avatar May 26 '21 09:05 mustafa-707

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

AlexHartford avatar May 26 '21 15:05 AlexHartford

ty @AlexHartford for the workaround I'll keep checking until the update fixes the null safety error

thiagorobertodc avatar Jun 02 '21 19:06 thiagorobertodc

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

maerlynflagg avatar Jun 10 '21 11:06 maerlynflagg

Duplicate of #239

tayseer9 avatar Jun 17 '21 07:06 tayseer9

Waiting for this to be pushed to pub.dev since I am using a package that indirectly depends on this one.

vivian-ng avatar Jul 24 '21 02:07 vivian-ng

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

ahmednfwela avatar Oct 29 '21 03:10 ahmednfwela