query<T extends RealmObject> method Null safety

RealmResults<T> query<T extends RealmObject>(
  1. String query,
  2. [List<Object> args = const []]
)

Returns all RealmObjects that match the specified query.

The Realm Dart and Realm Flutter SDKs supports querying based on a language inspired by NSPredicate and Predicate Programming Guide.

Implementation

RealmResults<T> query<T extends RealmObject>(String query, [List<Object> args = const []]) {
  RealmMetadata metadata = _getMetadata(T);
  final handle = realmCore.queryClass(this, metadata.class_.key, query, args);
  return RealmResultsInternal.create<T>(handle, this);
}