getService method

Future<Service?> getService(
  1. String type
)

Implementation

Future<Service?> getService(String type) async {
  var service =
      services.firstWhereOrNull((it) => it.type == type || it.id == type);

  if (service != null) {
    return await service.getService(this);
  } else {
    return null;
  }
}