1
0
Fork 0
mirror of https://gitlab.com/nkming2/nc-photos.git synced 2025-03-10 01:08:54 +01:00
nc-photos/app/lib/or_null.dart
2022-04-06 02:37:58 +08:00

10 lines
305 B
Dart

/// To hold optional arguments that themselves could be null
class OrNull<T> {
OrNull(this.obj);
/// Return iff the value of [x] is set to null, which means if [x] itself is
/// null, false will still be returned
static bool isSetNull(OrNull? x) => x != null && x.obj == null;
final T? obj;
}