Want to get the filename of a file in flutter? You can use the basename function from the dart path library:
1 2 3 | File file = new File("/dir1/dir2/file.ext"); String basename = basename(file.path); # file.ext |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.