Json.from constructor Null safety
- Json other
Create Json from another
Implementation
Json.from(Json other) {
if (other._rawValue is int ||
other._rawValue is double ||
other._rawValue is bool ||
other._rawValue is String ||
other._rawValue == null) {
_rawValue = other._rawValue;
} else if (other._rawValue is Map) {
_rawValue = Map<String, dynamic>.from(other._rawValue as Map);
} else if (other._rawValue is List) {
_rawValue = List<dynamic>.from(other._rawValue as List);
} else {
assert(false);
}
exception = other.exception;
}