flutter get file name
import 'package:path/path.dart';
File file = new File("/dir1/dir2/file.ext");
String basename = basename(file.path);
# file.ext
flutter get file name
import 'package:path/path.dart';
File file = new File("/dir1/dir2/file.ext");
String basename = basename(file.path);
# file.ext
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);
}
flutter file full name
File file = new File("/storage/emulated/0/Android/data/my_app/files/Pictures/ca04f332.png");
String fileName = file.path.split('/').last;
print(fileName);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us