getScriptIdWithFileName method

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

Implementation

Future<String?> getScriptIdWithFileName(String fileName) async {
  ScriptList scriptList = await serviceWrapper.getScripts();
  final scripts = scriptList.scripts!;

  for (final script in scripts) {
    if (script.uri!.contains(fileName)) return script.id;
  }

  return null;
}