I want to upload a video file to my cloud storage but I want to check the size of the video file before I upload. how to achieve this
If you have the path of the file, you can use dart:io
dart:io
var file = File('the_path_to_the_video.mp4');
You an either use:
print(file.lengthSync());
or
print (await file.length());
Note: The size returned is in bytes.
bytes