import 'package:image_picker/image_picker.dart';

Future<List<XFile?>> getImage(opc) async {
  final ImagePicker picker = ImagePicker();

  if (opc == 1) {
    XFile? image = await picker.pickImage(source: ImageSource.camera);
    return [image];
  } else if (opc == 2) {
    XFile? image = await picker.pickImage(source: ImageSource.gallery);
    return [image];
  } else {
    final List<XFile> images = await picker.pickMultiImage();
    return images;
  }
}
