flutter_datetime_picker icon indicating copy to clipboard operation
flutter_datetime_picker copied to clipboard

Color' is from 'dart:ui'. color: theme.backgroundColor ?? Colors.white,

Open tayyabmughal676 opened this issue 4 years ago • 11 comments
trafficstars

/FlutterTools/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,

tayyabmughal676 avatar Aug 25 '21 12:08 tayyabmughal676

We are also having the same warning message on every build/hot reload.

coleary01 avatar Aug 25 '21 14:08 coleary01

Alright, the library developer need to fix it :)

tayyabmughal676 avatar Aug 26 '21 03:08 tayyabmughal676

They do not fix it ver long time... I fix it myself. it is simple. simply change the code "color: theme.backgroundColor ?? Colors.white" to "color: theme.backgroundColor".

Taehyung93 avatar Aug 31 '21 07:08 Taehyung93

Thanks, Kim! I'll try to fix it :)

On Tue, Aug 31, 2021 at 12:45 PM Taehyung Kim @.***> wrote:

They do not fix it ver long time... I fix it myself. it is simple. simply change the code "color: theme.backgroundColor ?? Colors.white" to "color: theme.backgroundColor".

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Realank/flutter_datetime_picker/issues/269#issuecomment-908984546, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE3SYEWU4JWIKWCWRRO3RLDT7SCCTANCNFSM5CY7ZZPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

tayyabmughal676 avatar Aug 31 '21 08:08 tayyabmughal676

just noisy

emmanuel-montoya avatar Sep 07 '21 03:09 emmanuel-montoya

wait notification fix.

seth-shi avatar Sep 14 '21 03:09 seth-shi

Needs to make backgroundColor nullable. For now we need to make nullable as mentioned on image below until library gets updated.

Screen Shot 2021-09-30 at 09 50 58 .

Pragt avatar Sep 30 '21 04:09 Pragt

@tayyabmughal676 Has this issue been resolved?

rikai-trongpq avatar Jan 04 '22 03:01 rikai-trongpq

Me too I can reproduce this error with the last version. Could you guys fix this bug, please?

Thanks in advance!

jsanz1209 avatar Jan 26 '22 08:01 jsanz1209

ANy update on this its driving me nuts?

andrewames avatar Feb 18 '22 13:02 andrewames

They solved but still not published to pub.dev just use

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

or fork and use yours

marcolettieri avatar Mar 02 '22 15:03 marcolettieri