replaceDerivationPathIndex function

String replaceDerivationPathIndex(
  1. String path,
  2. int index
)

Implementation

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