query<T extends RealmObject> method

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 []]) {
  final metadata = _metadata.getByType(T);
  return RealmResultsInternal.create<T>(
    _handle.queryClass(metadata.classKey, query, args),
    this,
    metadata,
  );
}