getService<S> method

S? getService<S>()

Retrieves a request-scoped service of type S.

Implementation

S? getService<S>() {
  final service = services[S];
  if (service is S) return service;
  return null;
}