setResource method
void
setResource(})
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);