From 0c33196cee149cd40a03a9e409cb35295645c71f Mon Sep 17 00:00:00 2001 From: tushar dubey <41254191+tushardubey121@users.noreply.github.com> Date: Mon, 12 Jul 2021 19:18:58 +0530 Subject: [PATCH] To fix Warning: Operand of null-aware operation '??' Warning: Operand of null-aware operation '??' has type 'Color' which excludes null. - 'Color' is from 'dart:ui'. color: theme.backgroundColor ?? Colors.white, To fix this waiting update the color theme null check like "theme.backgroundColor == null ? Colors.white : theme.backgroundColor" --- lib/flutter_datetime_picker.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/flutter_datetime_picker.dart b/lib/flutter_datetime_picker.dart index dba6b566..897e8d9c 100644 --- a/lib/flutter_datetime_picker.dart +++ b/lib/flutter_datetime_picker.dart @@ -309,7 +309,7 @@ class _DatePickerState extends State<_DatePickerComponent> { ), child: GestureDetector( child: Material( - color: theme.backgroundColor, + color: theme.backgroundColor == null ? Colors.white : theme.backgroundColor, child: _renderPickerView(theme), ), ),