21 lines
418 B
Dart
21 lines
418 B
Dart
extension StringNullableExtensions on String? {
|
|
bool toBoolean() {
|
|
if (this == null) return false;
|
|
return this!.toLowerCase() == 'true';
|
|
}
|
|
|
|
bool isNullOrEmpty() {
|
|
if (this == null) return true;
|
|
if (this == '') return true;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
extension StringExtensions on String {
|
|
bool toBoolean() {
|
|
return this.toLowerCase() == 'true';
|
|
}
|
|
}
|
|
|
|
extension StringExtension on String? {}
|