get<T extends Object?> method

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

Gets the instance of T with or without id given.

If not found and has registered, create a new instance.

If found it, returns it, else returns null.

Implementation

T? get<T extends Object?>([String? id]) {
  return _getAndCreateIfNotExtist<T>(id)?.instance;
}