
import 'package:file_picker/file_picker.dart';
import 'package:image_picker/image_picker.dart';

class FilePick {
  static final _picker = ImagePicker();

  static Future<XFile?> galleryPick() async {
    final XFile? pickedImage = await _picker.pickImage(source: ImageSource.gallery);
    if (pickedImage != null) {
      return pickedImage;
    }
    return null;
  }

  static Future<String?> documentPick() async {
    FilePickerResult? result = await FilePicker.platform.pickFiles();
    return result?.files.single.path;
  }
}