mirrored_repositories/blog_app/lib/core
import 'dart:io';

import 'package:image_picker/image_picker.dart';

Future<File?> pickImage() async {
  try {
    final image = await ImagePicker().pickImage(
      source: ImageSource.gallery,
    );
    if (image != null) {
      return File(image.path);
    }

    return null;
  } catch (e) {
    return null;
  }
}
