I am using the following code snippet to attempt to retrieve the modified time of a file:
import 'dart:io';
import 'package:image_picker/image_picker.dart';
final picker = ImagePicker();
final pickedFile = await picker.getVideo(source: ImageSource.gallery);
final file = File(pickedFile.path);
print("file modified time: ${file.lastModifiedSync().toIso8601String()}");
Whenever I run the the above snippet, regardless of the file, it prints the current dateTime as opposed to the file's modified dataTime