getFileName method

String? getFileName(
  1. File file
)

This function is used for get file name with extension

Implementation

String? getFileName(File file) {
  return file.path.split('/').last;
}