Kanwarpreet Singh
Kanwarpreet Singh

Reputation: 2096

Flutter ImagePicker Not able to run or build project when I add it to pubspec.yaml

When I add the Image picker library to my project it start giving following issue when ever I try to build/run the project.

My pubspec.yaml file

name: splitwise_flutter
description: "A new Flutter project."
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.0.0+1

environment:
  sdk: '>=2.12.0 <4.0.0'

dependencies:
  flutter:
    sdk: flutter
  image_picker: 0.8.6
  get: ^4.6.6
  google_fonts: ^6.2.1
  cupertino_icons: ^1.0.6
  smooth_page_indicator: ^1.2.0+3
  intl_phone_number_input: ^0.7.4
  flutter_otp_text_field: ^1.1.3+2
  firebase_core: ^3.3.0
  firebase_auth: ^5.1.4
  cloud_firestore: ^5.2.1
  firebase_storage: ^12.1.2


dev_dependencies:
  flutter_test:
    sdk: flutter

  flutter_lints: ^3.0.0

flutter:
  assets:
    - assets/images/
    - assets/images/2x/
    - assets/images/3x/
    - assets/images/4x/

  fonts:
    - family: Poppins
      fonts:
        - asset: assets/fonts/Poppins-Regular.ttf
          weight: 400

  uses-material-design: true

Flutter Doctor Summary :

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.24.0, on Microsoft Windows [Version 10.0.19045.4780], locale en-IN)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop Windows apps
    X Visual Studio not installed; this is necessary to develop Windows apps.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2024.1)
[√] Connected device (4 available)
[√] Network resources

! Doctor found issues in 1 category.

Error:

Running Gradle task 'assembleDebug'...
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:11:27: Error: Type 'ImageSource' not found.
SourceType _convertSource(ImageSource source) {
                          ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:28:29: Error: Type 'CameraDevice' not found.
SourceCamera _convertCamera(CameraDevice camera) {
                            ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:45:30: Error: Type 'ImagePickerPlatform' not found.
class ImagePickerIOS extends ImagePickerPlatform {
                             ^^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:54:10: Error: Type 'PickedFile' not found.
  Future<PickedFile?> pickImage({
         ^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:55:14: Error: Type 'ImageSource' not found.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:59:5: Error: Type 'CameraDevice' not found.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
    ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:75:14: Error: Type 'ImageSource' not found.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:76:5: Error: Type 'ImagePickerOptions' not found.
    ImagePickerOptions options = const ImagePickerOptions(),
    ^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:86:15: Error: Type 'PickedFile' not found.
  Future<List<PickedFile>?> pickMultiImage({
              ^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:111:5: Error: Type 'MultiImagePickerOptions' not found.
    MultiImagePickerOptions options = const MultiImagePickerOptions(),
    ^^^^^^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:118:5: Error: Type 'MultiImagePickerOptions' not found.
    MultiImagePickerOptions options = const MultiImagePickerOptions(),
    ^^^^^^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:153:14: Error: Type 'ImageSource' not found.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:154:5: Error: Type 'ImagePickerOptions' not found.
    ImagePickerOptions options = const ImagePickerOptions(),
    ^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:185:14: Error: Type 'MediaOptions' not found.
    required MediaOptions options,
             ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:195:48: Error: Type 'ImageOptions' not found.
  MaxSize _imageOptionsToMaxSizeWithValidation(ImageOptions imageOptions) {
                                               ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:217:7: Error: Type 'MediaOptions' not found.
      MediaOptions mediaOptions) {
      ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:246:10: Error: Type 'PickedFile' not found.
  Future<PickedFile?> pickVideo({
         ^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:247:14: Error: Type 'ImageSource' not found.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:248:5: Error: Type 'CameraDevice' not found.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
    ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:260:14: Error: Type 'ImageSource' not found.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:261:5: Error: Type 'CameraDevice' not found.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
    ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:273:14: Error: Type 'ImageSource' not found.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:277:5: Error: Type 'CameraDevice' not found.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
    ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:317:14: Error: Type 'ImageSource' not found.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:318:5: Error: Type 'CameraDevice' not found.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
    ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:59:42: Error: Undefined name 'CameraDevice'.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
                                         ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:76:40: Error: Couldn't find constructor 'ImagePickerOptions'.
    ImagePickerOptions options = const ImagePickerOptions(),
                                       ^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:111:45: Error: Couldn't find constructor 'MultiImagePickerOptions'.
    MultiImagePickerOptions options = const MultiImagePickerOptions(),
                                            ^^^^^^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:118:45: Error: Couldn't find constructor 'MultiImagePickerOptions'.
    MultiImagePickerOptions options = const MultiImagePickerOptions(),
                                            ^^^^^^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:154:40: Error: Couldn't find constructor 'ImagePickerOptions'.
    ImagePickerOptions options = const ImagePickerOptions(),
                                       ^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:248:42: Error: Undefined name 'CameraDevice'.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
                                         ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:261:42: Error: Undefined name 'CameraDevice'.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
                                         ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:277:42: Error: Undefined name 'CameraDevice'.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
                                         ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:318:42: Error: Undefined name 'CameraDevice'.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
                                         ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:11:27: Error: 'ImageSource' isn't a type.
SourceType _convertSource(ImageSource source) {
                          ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:13:10: Error: Undefined name 'ImageSource'.
    case ImageSource.camera:
         ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:15:10: Error: Undefined name 'ImageSource'.
    case ImageSource.gallery:
         ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:28:29: Error: 'CameraDevice' isn't a type.
SourceCamera _convertCamera(CameraDevice camera) {
                            ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:30:10: Error: Undefined name 'CameraDevice'.
    case CameraDevice.front:
         ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:32:10: Error: Undefined name 'CameraDevice'.
    case CameraDevice.rear:
         ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:50:5: Error: Undefined name 'ImagePickerPlatform'.
    ImagePickerPlatform.instance = ImagePickerIOS();
    ^^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:55:14: Error: 'ImageSource' isn't a type.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:59:5: Error: 'CameraDevice' isn't a type.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
    ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:63:16: Error: The method 'ImagePickerOptions' isn't defined for the class 'ImagePickerIOS'.
 - 'ImagePickerIOS' is from 'package:image_picker_ios/image_picker_ios.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart').
Try correcting the name to the name of an existing method, or defining a method named 'ImagePickerOptions'.
      options: ImagePickerOptions(
               ^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:70:27: Error: The method 'PickedFile' isn't defined for the class 'ImagePickerIOS'.
 - 'ImagePickerIOS' is from 'package:image_picker_ios/image_picker_ios.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart').
Try correcting the name to the name of an existing method, or defining a method named 'PickedFile'.
    return path != null ? PickedFile(path) : null;
                          ^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:75:14: Error: 'ImageSource' isn't a type.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:76:5: Error: 'ImagePickerOptions' isn't a type.
    ImagePickerOptions options = const ImagePickerOptions(),
    ^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:92:16: Error: The method 'MultiImagePickerOptions' isn't defined for the class 'ImagePickerIOS'.
 - 'ImagePickerIOS' is from 'package:image_picker_ios/image_picker_ios.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart').
Try correcting the name to the name of an existing method, or defining a method named 'MultiImagePickerOptions'.
      options: MultiImagePickerOptions(
               ^^^^^^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:93:23: Error: The method 'ImageOptions' isn't defined for the class 'ImagePickerIOS'.
 - 'ImagePickerIOS' is from 'package:image_picker_ios/image_picker_ios.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart').
Try correcting the name to the name of an existing method, or defining a method named 'ImageOptions'.
        imageOptions: ImageOptions(
                      ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:106:40: Error: The method 'PickedFile' isn't defined for the class 'ImagePickerIOS'.
 - 'ImagePickerIOS' is from 'package:image_picker_ios/image_picker_ios.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart').
Try correcting the name to the name of an existing method, or defining a method named 'PickedFile'.
    return paths.map((dynamic path) => PickedFile(path as String)).toList();
                                       ^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:111:5: Error: 'MultiImagePickerOptions' isn't a type.
    MultiImagePickerOptions options = const MultiImagePickerOptions(),
    ^^^^^^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:118:5: Error: 'MultiImagePickerOptions' isn't a type.
    MultiImagePickerOptions options = const MultiImagePickerOptions(),
    ^^^^^^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:153:14: Error: 'ImageSource' isn't a type.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:154:5: Error: 'ImagePickerOptions' isn't a type.
    ImagePickerOptions options = const ImagePickerOptions(),
    ^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:185:14: Error: 'MediaOptions' isn't a type.
    required MediaOptions options,
             ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:195:48: Error: 'ImageOptions' isn't a type.
  MaxSize _imageOptionsToMaxSizeWithValidation(ImageOptions imageOptions) {
                                               ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:217:7: Error: 'MediaOptions' isn't a type.
      MediaOptions mediaOptions) {
      ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:247:14: Error: 'ImageSource' isn't a type.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:248:5: Error: 'CameraDevice' isn't a type.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
    ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:256:27: Error: The method 'PickedFile' isn't defined for the class 'ImagePickerIOS'.
 - 'ImagePickerIOS' is from 'package:image_picker_ios/image_picker_ios.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart').
Try correcting the name to the name of an existing method, or defining a method named 'PickedFile'.
    return path != null ? PickedFile(path) : null;
                          ^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:260:14: Error: 'ImageSource' isn't a type.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:261:5: Error: 'CameraDevice' isn't a type.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
    ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:273:14: Error: 'ImageSource' isn't a type.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:277:5: Error: 'CameraDevice' isn't a type.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
    ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:281:16: Error: The method 'ImagePickerOptions' isn't defined for the class 'ImagePickerIOS'.
 - 'ImagePickerIOS' is from 'package:image_picker_ios/image_picker_ios.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart').
Try correcting the name to the name of an existing method, or defining a method named 'ImagePickerOptions'.
      options: ImagePickerOptions(
               ^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:298:16: Error: The method 'MultiImagePickerOptions' isn't defined for the class 'ImagePickerIOS'.
 - 'ImagePickerIOS' is from 'package:image_picker_ios/image_picker_ios.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart').
Try correcting the name to the name of an existing method, or defining a method named 'MultiImagePickerOptions'.
      options: MultiImagePickerOptions(
               ^^^^^^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:299:23: Error: The method 'ImageOptions' isn't defined for the class 'ImagePickerIOS'.
 - 'ImagePickerIOS' is from 'package:image_picker_ios/image_picker_ios.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart').
Try correcting the name to the name of an existing method, or defining a method named 'ImageOptions'.
        imageOptions: ImageOptions(
                      ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:317:14: Error: 'ImageSource' isn't a type.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_ios-0.8.12/lib/image_picker_ios.dart:318:5: Error: 'CameraDevice' isn't a type.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
    ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_platform_interface-2.10.0/lib/src/types/types.dart: Error: The control character U+0000 can only be used in strings and comments.
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_platform_interface-2.10.0/lib/src/platform_interface/image_picker_platform.dart: Error: The control character U+0000 can only be used in strings and comments.
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:13:34: Error: Type 'ImagePickerPlatform' not found.
class ImagePickerAndroid extends ImagePickerPlatform {
                                 ^^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:31:10: Error: Type 'PickedFile' not found.
  Future<PickedFile?> pickImage({
         ^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:32:14: Error: Type 'ImageSource' not found.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:36:5: Error: Type 'CameraDevice' not found.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
    ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:49:15: Error: Type 'PickedFile' not found.
  Future<List<PickedFile>?> pickMultiImage({
              ^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:104:14: Error: Type 'ImageSource' not found.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:108:5: Error: Type 'CameraDevice' not found.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
    ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:139:10: Error: Type 'PickedFile' not found.
  Future<PickedFile?> pickVideo({
         ^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:140:14: Error: Type 'ImageSource' not found.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:141:5: Error: Type 'CameraDevice' not found.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
    ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:153:14: Error: Type 'ImageSource' not found.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:154:5: Error: Type 'CameraDevice' not found.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
    ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:170:14: Error: Type 'ImageSource' not found.
    required ImageSource source,
             ^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:174:5: Error: Type 'CameraDevice' not found.
    CameraDevice preferredCameraDevice = CameraDevice.rear,
    ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:188:14: Error: Type 'ImageSource' not found.
    required ImageSource source,
             ^^^^^^^^^^^

             ^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:328:12: Error: The method 'LostData' isn't defined for the class 'ImagePickerAndroid'.
 - 'ImagePickerAndroid' is from 'package:image_picker_android/image_picker_android.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart').
Try correcting the name to the name of an existing method, or defining a method named 'LostData'.
    return LostData(
           ^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:329:35: Error: The method 'PickedFile' isn't defined for the class 'ImagePickerAndroid'.
 - 'ImagePickerAndroid' is from 'package:image_picker_android/image_picker_android.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart').
Try correcting the name to the name of an existing method, or defining a method named 'PickedFile'.
      file: result.file != null ? PickedFile(result.file!.path) : null,
                                  ^^^^^^^^^^

               ^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart:416:12: Error: The getter 'RetrieveType' isn't defined for the class 'ImagePickerAndroid'.
 - 'ImagePickerAndroid' is from 'package:image_picker_android/image_picker_android.dart' ('../../../AppData/Local/Pub/Cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/image_picker_android.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'RetrieveType'.
    return RetrieveType.image;
           ^^^^^^^^^^^^
Target kernel_snapshot_program failed: Exception


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\Kanwar\Documents\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

Upvotes: 0

Views: 140

Answers (0)

Related Questions