baptx
0
Q:

get file name from path dart

void main() {
  var completePath = "/dev/dart/work/hello/app.dart";
  var fileName = (completePath.split('/').last);
  var filePath = completePath.replaceAll("/$fileName", '');
  print(fileName);
  print(filePath);
}
0

New to Communities?

Join the community