String replaceDerivationPathIndex(String path, int index) { final newPath = path.split('/'); newPath.last = index.toString(); return newPath.join('/'); }