setResource method

void setResource(
  1. String name,
  2. Function callback, {
  3. String context = 'utopia',
  4. List<String> injections = const [],
})

Set resource Once set, you can use inject to inject these resources to set other resources or in the hooks and routes

Implementation

void setResource(
  String name,
  Function callback, {
  String context = 'utopia',
  List<String> injections = const [],
}) =>
    _di.set(name, callback, injections: injections, context: context);