flutter_datetime_picker icon indicating copy to clipboard operation
flutter_datetime_picker copied to clipboard

Warning: Operand of null-aware operation '??' has type 'Color' which excludes null. - 'Color' is from 'dart:ui'. color: theme.backgroundColor ?? Colors.white,

Open mengsiyitiaojie opened this issue 3 years ago • 11 comments

Warning: Operand of null-aware operation '??' has type 'Color' which excludes null.

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

mengsiyitiaojie avatar Jul 06 '21 03:07 mengsiyitiaojie

Unnecessary duplicate issue created

Previous duplicates:

  • https://github.com/Realank/flutter_datetime_picker/issues/244
  • https://github.com/Realank/flutter_datetime_picker/issues/248

cybex-dev avatar Jul 07 '21 07:07 cybex-dev

Just update null check in flutter_datetime_picker.dart

from this child: Material( color: theme.backgroundColor ?? Colors.white , child: _renderPickerView(theme), ) To this child: Material( color: theme.backgroundColor == null ? Colors.white : theme.backgroundColor, child: _renderPickerView(theme), )

tushardubey121 avatar Jul 12 '21 13:07 tushardubey121

Just update null check in flutter_datetime_picker.dart

from this child: Material( color: theme.backgroundColor ?? Colors.white , child: _renderPickerView(theme), ) To this child: Material( color: theme.backgroundColor == null ? Colors.white : theme.backgroundColor, child: _renderPickerView(theme), )

I recommend you do that then open a pull request

Fethi-Hamdani avatar Jul 22 '21 13:07 Fethi-Hamdani

Already done @Fethi1

tushardubey121 avatar Jul 22 '21 19:07 tushardubey121

Already done @Fethi1

Amazing, Thank you!

Fethi-Hamdani avatar Jul 22 '21 21:07 Fethi-Hamdani

When will a new version with the correction of this error be available? thanks for the work

xino1010 avatar Jul 26 '21 14:07 xino1010

Just following up on this...Are there any updates as to when this will be fixed?

slagathor2094 avatar Aug 17 '21 22:08 slagathor2094

hello, any news?

nirbar89 avatar Aug 22 '21 13:08 nirbar89

So, this annoying warning is just pending a merge to get fixed, right? Is it gonna take many more months?

apparatchiki avatar Sep 19 '21 21:09 apparatchiki

hello @nirbar89 @apparatchiki author is inactive. use alternetive as same code https://pub.dev/packages/flutter_datetime_picker_bdaya/install

febritecno avatar Dec 17 '21 07:12 febritecno

You can fork the project and fix the simple issue.

eyoeldefare avatar Feb 14 '22 18:02 eyoeldefare