service<T extends ChopperService> method

T service<T extends ChopperService>(
  1. Type type
)

Implementation

T service<T extends ChopperService>(Type type) {
  final s = services[type];
  if (s == null) {
    throw Exception("Service of type '$type' not found.");
  }
  return s as T;
}