find<R> static method

dynamic find<R>([
  1. R? instanceType
])

Return an instance of an object by its type, throw an error in case it is not set

Implementation

static dynamic find<R>([R? instanceType]) {
  final key = (instanceType ?? R).toString();
  if (Wire.data(key).isSet == false) throw AssertionError(ERROR__CANT_FIND_INSTANCE_NULL);
  return Wire.data(key).value!;
}