getCodeByFileName method

Future<String?> getCodeByFileName(
  1. String fileName
)

Implementation

Future<String?> getCodeByFileName(String fileName) async {
  CodeDisplayService codeDisplayService = CodeDisplayService();
  String? sourceCode;
  String? scriptId =
      await codeDisplayService.getScriptIdWithFileName(fileName);
  if (scriptId != null) {
    sourceCode = await codeDisplayService.getSourceCodeWithScriptId(scriptId);
  }
  return sourceCode;
}