resolve method

Function resolve(
  1. IocContainer ioc,
  2. String where
)

the controller method, with the controller from ioc

Implementation

Function resolve(IocContainer ioc, String where) {
  Object? method;
  try {
    method = (select as dynamic)(ioc.get<T>());
  } on NoSuchMethodError {
    method = null;
  }
  if (method is! Function) {
    throw StateError(
      'Route $where: the action of Route.<method><$T> must take the '
      'controller and give one of its methods, like '
      '($T c) => c.index.',
    );
  }
  return method;
}