I am reporting the following error while executing the code below
bool isNotEmpty(String text) {
return text?.isNotEmpty ?? false;
}
bool isEmpty(String text) {
return text?.isEmpty ?? true;
}
lib/util/string_util.dart:2:10: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null. return text?.isNotEmpty ?? false;
lib/util/string_util.dart:6:10: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null. return text?.isEmpty ?? true;