Created
November 27, 2022 10:54
-
-
Save CoderNamedHendrick/6c4948fdf144038085cc2ca7156a30b3 to your computer and use it in GitHub Desktop.
String checks extension.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension StringCheckers on String? { | |
bool get isBlank { | |
final value = this?.trim(); | |
if (value == null || value.isEmpty){ | |
return true; | |
} | |
return false; | |
} | |
bool get isNotBlank { | |
return !isBlank; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment