first commit
This commit is contained in:
10
lib/services/file_picker_service_native.dart
Normal file
10
lib/services/file_picker_service_native.dart
Normal file
@@ -0,0 +1,10 @@
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
|
||||
Future<Uint8List?> pickImageBytes() async {
|
||||
final picker = ImagePicker();
|
||||
final file = await picker.pickImage(source: ImageSource.gallery);
|
||||
if (file == null) return null;
|
||||
return await file.readAsBytes();
|
||||
}
|
||||
Reference in New Issue
Block a user