getIdWithClassName method

Future<String?> getIdWithClassName(
  1. String className
)

Implementation

Future<String?> getIdWithClassName(String className) async {
  final classList = await serviceWrapper.getClassList();
  final classes = classList.classes;
  if (classes == null) return null;

  for (final cls in classes) {
    if (cls.name == className) return cls.id;
  }

  return null;
}