We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 65b708d commit 92235d1Copy full SHA for 92235d1
lib/src/api/typed_value.dart
@@ -8,6 +8,7 @@ extension ObjectExt on Object? {
8
/// Returns [defaultValue] or null otherwise.
9
R? typedValue<R extends Object>({R? defaultValue}) {
10
final value = this;
11
+ if(this == null) return defaultValue;
12
if (value is R) return value;
13
14
return switch (R) {
0 commit comments