Commit 8a82961
authored
add ' 'isNotEmpty
`isNotEmpty` in Dart is used to check if a collection (like a string, list, set, or map) contains any elements, enhancing code readability and consistency.
//Code Example
List<int> numbers = [1, 2, 3];
if (numbers.isNotEmpty) {
print("The list is not empty.");
}1 parent 3f91a7d commit 8a82961
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
| |||
0 commit comments