getFileSize function
Implementation
bool getFileSize(String path) {
bool isValid = true;
final file = File(path);
int sizeInBytes = file.lengthSync();
double sizeInMb = sizeInBytes / (1024 * 1024);
if (sizeInMb > 10){
isValid = false;
print("<><><><><>");
print(sizeInMb);
// This file is Longer the
} else {
print("<><><><><>");
print(sizeInMb);
}
return isValid;
}