getScriptIdsWithKeyword method

Future<Map<String?, String?>> getScriptIdsWithKeyword(
  1. String keyword
)

Implementation

Future<Map<String?, String?>> getScriptIdsWithKeyword(String keyword) async {
  ScriptList scriptList = await serviceWrapper.getScripts();

  var result = <String?, String?>{};

  scriptList.scripts!.forEach((script) {
    if (script.uri!.contains(keyword)) {
      result[script.id] = script.uri;
    }
  });
  return result;
}