exists<T extends Object?> method

bool exists<T extends Object?>([
  1. String? id
])

Valids if the instance of T with or without id given exists.

Implementation

bool exists<T extends Object?>([String? id]) {
  final instanceKey = ReactterInstance.generateKey<T?>(id);

  return _instancesByKey[instanceKey]?.instance != null;
}