Answers for "flutter get size of file using url"

0

how to get File height and width in flutter

File image = new File('image.png'); // Or any other way to get a File instance.
var decodedImage = await decodeImageFromList(image.readAsBytesSync());
print(decodedImage.width);
print(decodedImage.height);
Posted by: Guest on March-26-2021
0

flutter get file size

final file = File('pickedVid.mp4');            
int sizeInBytes = file.lengthSync();
double sizeInMb = sizeInBytes / (1024 * 1024);
if (sizeInMb > 10){
    // This file is Longer the
}
Posted by: Guest on October-28-2021

Code answers related to "Dart"

Browse Popular Code Answers by Language