flutter_datetime_picker icon indicating copy to clipboard operation
flutter_datetime_picker copied to clipboard

Getting the backgroundColor issue printed over debug Console everytime I run or save the Project

Open deepak-ra opened this issue 4 years ago • 4 comments

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,

deepak-ra avatar Jun 23 '21 18:06 deepak-ra

  • me too!

  • env

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.1, on Mac OS X 10.15.7 19H2 darwin-x64,
    locale zh-Hans-CN)
[✓] 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)
[✓] IntelliJ IDEA Ultimate Edition (version 2020.3.4)
[✓] VS Code (version 1.57.1)
[✓] Connected device (4 available)
  • console
/flutter/.pub-cache/hosted/pub.flutter-io.cn/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,

cdk8s-zelda avatar Jun 24 '21 17:06 cdk8s-zelda

Any Update on this ?

deepak-kumar-swain avatar Jun 26 '21 02:06 deepak-kumar-swain

Getting the same issue. ../../../../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,

                            ^
    

Any update on this?

imrishuroy avatar Jun 26 '21 06:06 imrishuroy

It is fixed, it's just not merged yet. Like Alex pointed out before on this thread you can pull from master branch from git for now, edit your pubspec.yml to:

flutter_datetime_picker:
   git:
     url: https://github.com/Realank/flutter_datetime_picker.git
     ref: master

hedbladucf avatar Jun 27 '21 14:06 hedbladucf