getFirstClassNameInFile function

JSONString getFirstClassNameInFile(
  1. String codePath
)

Implementation

JSONString getFirstClassNameInFile(String codePath) {
  try {
    final f = JSONStringResult
        .parse(getClassNameListInFile(codePath))
        .dataAsList<String>()
        ?.first;
    return f ?? "";
  } catch (e) {
    return "";
  }
}