Last active
December 22, 2021 03:47
-
-
Save xanahopper/7990be23eef7d5950533f32d5360158f to your computer and use it in GitHub Desktop.
This file contains 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 on Map? { | |
bool get isNullOrEmpty => this?.isEmpty ?? true; | |
bool get isNotNullOrEmpty => !isNullOrEmpty; | |
} | |
void main() { | |
Map<String, dynamic>? info; | |
print(info.isNullOrEmpty); | |
print(info.isNotNullOrEmpty); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment