loadImageBytes method
Implementation
Future<Uint8List?> loadImageBytes(ImageSource source) async {
if (!source.isValid) return null;
try {
return await compute<ImageSource, Uint8List?>(
(source) => source.getBytes(),
source,
);
} catch (e) {
error('Erreur lors du chargement de l\'image: $e');
return null;
}
}