RealmValue.from constructor

RealmValue.from(
  1. Object? object
)

Will throw ArgumentError

Implementation

factory RealmValue.from(Object? object) {
  if (object == null ||
      object is bool ||
      object is String ||
      object is int ||
      object is Float ||
      object is double ||
      object is RealmObjectMarker ||
      object is DateTime ||
      object is ObjectId ||
      object is Decimal128 ||
      object is Uuid ||
      object is Uint8List) {
    return RealmValue._(object);
  } else {
    throw ArgumentError.value(object, 'object', 'Unsupported type');
  }
}