Skip to content

Commit c78a07d

Browse files
committed
Added log level comparison operators
1 parent 931076d commit c78a07d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/src/log_level.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,12 @@ enum Level {
2020
final int value;
2121

2222
const Level(this.value);
23+
24+
bool operator <(Level other) => index < other.index;
25+
26+
bool operator <=(Level other) => index <= other.index;
27+
28+
bool operator >(Level other) => index > other.index;
29+
30+
bool operator >=(Level other) => index >= other.index;
2331
}

0 commit comments

Comments
 (0)