Flutter - Import Camera and Gallery Image | Best Ways

Поделиться
HTML-код
  • Опубликовано: 9 сен 2024

Комментарии • 84

  • @RetroPortalStudio
    @RetroPortalStudio  4 года назад +3

    If you find this video useful, consider Following me on:
    Twitter: twitter.com/theretroportal
    Instagram: instagram.com/retroportalstudio
    Happy Coding! ✌️😁

  • @silvertidus
    @silvertidus 4 года назад +9

    iOS: Crash or lost connection when press Gallery / Camera:
    Open Runner/Info.plist and add:
    NSPhotoLibraryUsageDescription
    Photo Library Access Warning
    NSCameraUsageDescription
    My description about why I need this capability

    • @RetroPortalStudio
      @RetroPortalStudio  4 года назад

      Thanks for rhe iOS update mate! Pinned!

    • @iamhassii6084
      @iamhassii6084 4 года назад

      @@RetroPortalStudio is there any way that camera preview inside a container

    • @vuvanlong2047
      @vuvanlong2047 8 месяцев назад

      great! thank you so much! I'm also struggling with this error!

  • @hungnguyenhbi3359
    @hungnguyenhbi3359 4 года назад +14

    Can you share code on Github?

  • @2SourceFort
    @2SourceFort 3 года назад +2

    Navigation.of(context).pop() also not working

  • @kronaemmanuel
    @kronaemmanuel 3 года назад +1

    Thankyou for a clear and concise tutorial

  • @FelipeCM123
    @FelipeCM123 3 года назад +2

    Great video, helped me a lot! Thank you! Just a little reminder, you forgot to return the Image widget in the decide function. I don't know Dart very profoundly but in the second time you ran the app it worked even without the return, if it was on android with Java probably it wouldn't.

  • @akbarrafs
    @akbarrafs 3 года назад

    I got an error. it said, "Columns children must not contain any values, but a null value was found at index 1" how to solve it:(

  • @thinhphamhuynh9436
    @thinhphamhuynh9436 4 года назад +5

    hi bro,
    how to fix :"Column's children must not contain any null values, but a null value was found at index 0
    tks !!

    • @husseinsaad9348
      @husseinsaad9348 4 года назад +2

      in _decideImageView method he didnt return the Image.file widget try using return keyword there

  • @AyanAli-sz5wc
    @AyanAli-sz5wc 2 года назад

    Anyone knows how to fix that issue [The element type 'Widget?' can't be assigned to the list type 'Widget'], it shows when I call the _decideImageView function in the container.

  • @jenllerena
    @jenllerena 4 года назад +1

    someone know how to solve this: [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: PlatformException(already_active, Image picker is already active, null) ?? thx

  • @mingwang9503
    @mingwang9503 3 года назад +3

    For anyone who got an error like this, ```Column's children must not contain any null values, but a null value was found at index 0```.
    A pretty simple way of solving this is, you just don't call method _decideImageView() on line 85, and put the following line there,
    imageFile == null ? Text('No Image Selected') : Image.file(imageFile,),
    This works for me. Hope this could help you.

  • @mijaelwatts
    @mijaelwatts 3 года назад +1

    Thnx for this tutorial, it was helpful and very clear.

  • @ShabbyCode
    @ShabbyCode 4 года назад +2

    it is showing type 'Future' is not a subtype of type '() => void

  • @jamesr2408
    @jamesr2408 3 года назад

    The camera captured images in the galley is empty. Is it because the updated version of image picker implements XFile instead of File for image?

  • @harishram1054
    @harishram1054 3 года назад

    Im getting an error saying
    Columns children must not contain any null values,but a null value was found
    Can someone help me with this asap .thankyou

  • @mrtiktoker920
    @mrtiktoker920 5 лет назад +1

    i follow this video but i have exception
    PlatformException(already_active, Image picker is already active, null)

  • @parthdutta8758
    @parthdutta8758 2 года назад

    Not able to access Imagepicker.pickImage and File imageFile, why can anyone help

  • @hammedmessi9286
    @hammedmessi9286 Год назад

    Good tutorial

  • @reactsolutions9608
    @reactsolutions9608 5 лет назад +2

    I/flutter (21426): (elided 5 frames from class _AssertionError and package dart:async)
    !children.any((widget child) => child == null)': is nort true
    this errors are coming when i click on i select image or camera.

    • @burak7149
      @burak7149 5 лет назад +1

      Add an return to the Image.file(imageFile);
      like this
      Widget _decideImageView(){
      if(imageFile == null){
      return Text("No Image");
      }
      else{
      return Image.file(imageFile);
      }
      }

    • @GhostRk007
      @GhostRk007 4 года назад +1

      @@burak7149 thanks bruh :)

    • @disadissanayake441
      @disadissanayake441 3 года назад +1

      @@burak7149 Thank u very much sir ❤️ ur comment is very helpful to me 😊

  • @2SourceFort
    @2SourceFort 3 года назад

    It's showing "pickImage" is not defined for the type imagerpicker

  • @mrg7475
    @mrg7475 4 года назад +1

    Congratulations, helped me a lots!

  • @stefanomilani
    @stefanomilani 5 лет назад +2

    Intresting explanation, thanks!

  • @ibadasif4093
    @ibadasif4093 3 года назад

    getting error in File imgae file turning into late File image file and giving LateInitializationError, Please help someone

  • @abdelrahmanahmed6274
    @abdelrahmanahmed6274 3 года назад

    thanks

  • @darvessingh
    @darvessingh 4 года назад +2

    Gallery is spelt like this BTW
    But thanks for thw help!

  • @thanusan
    @thanusan 4 года назад +1

    How do you upload personal images to gallery upon launch for iOS? Thanks for the tutorial btw

  • @wizardingstudios9933
    @wizardingstudios9933 4 года назад +1

    First shot is not recognised because it's the first shot of the phone. If you have a new emulator device please try to use the official camera to take the first shot of the phone, after this the app will immediately accept also the first camera shot.

  • @DryadRoot
    @DryadRoot 4 года назад

    on a real device (android phone) when I take the picture from camera It takes like 3 seconds or more until image is displayed on screen...

  • @shrishtigupta9318
    @shrishtigupta9318 3 года назад +2

    Please provide the code or github link. Its very urgent

    • @RetroPortalStudio
      @RetroPortalStudio  3 года назад +1

      Check this.. This is the updated Version ruclips.net/video/U_yqwBdb1jE/видео.html , you'll find the code (Drive Link) in Description!

    • @shrishtigupta9318
      @shrishtigupta9318 3 года назад

      @@RetroPortalStudio thank you

  • @supadickhead
    @supadickhead 4 года назад +2

    "Column's children must not contain any null values, but a null value was found at index 0" ....this is the error that i got after completing tutorial ...can anyone help please

    • @RetroPortalStudio
      @RetroPortalStudio  4 года назад

      Hey! Can you please explain when did this error occour? After capturing/picking the image or when you initially run the app! And make sure that you are passing correct widgets as Column's children!!

    • @supadickhead
      @supadickhead 4 года назад

      RetroPortal Studio the error occurs after I take a pic or choose from gallery...I replicated ur video

    • @supadickhead
      @supadickhead 4 года назад

      RetroPortal Studio I added Widget _decideImageView() to Column, above RaisedButton() widget

    • @RetroPortalStudio
      @RetroPortalStudio  4 года назад +1

      @Javier Sanchez Please check if you are "Returning" the Text view if the image == null. 😁 and Image in the else clause.
      If the error persis, send me the file over! I'll look at it ✌😁

    • @shashanksrivastava6464
      @shashanksrivastava6464 4 года назад

      @@RetroPortalStudio I am getting the same error and the image file is checked for null. I am getting similar error.

  • @2SourceFort
    @2SourceFort 3 года назад

    The method 'pickImage' isn't defined for the type 'ImagePicker'.
    Try correcting the name to the name of an existing method, or defining a method named 'pickImage'.

  • @rangergun7527
    @rangergun7527 4 года назад +3

    ImagePicker.pickImage has been depreciated?

  • @karlbooklover
    @karlbooklover 5 лет назад +1

    Hey, my app exits without any error message whatsoever when importing the camera dependency. Any idea how to fix this?

    • @RetroPortalStudio
      @RetroPortalStudio  5 лет назад +1

      Did you check the dependency version in lock file? If that is also okay, i will have to look at the program to figure out whats wrong :)

    • @karlbooklover
      @karlbooklover 5 лет назад

      @@RetroPortalStudio thank you for the response, I think I solved it by upgrading to AndroidX and upgrading all dependencies

  • @iamhassii6084
    @iamhassii6084 4 года назад

    is there any way that camera preview inside a container

  • @huzaifano1
    @huzaifano1 3 года назад

    Is there a way to access windows laptop camera?

  • @mrpakravian
    @mrpakravian 5 лет назад +1

    Great help

  • @AngeljesusM
    @AngeljesusM 4 года назад +1

    Muchas gracias, ni la documentacion original del paquete funciona bien. Graciassssssss

  • @rahulmacwan4494
    @rahulmacwan4494 5 лет назад +2

    Thank you for the amazing tutorial!
    I'm getting the same error as you got at 20:10. The failed assertion error. It's still there even after restarting the app like you did. Please, if you can help.

    • @ocean_academy
      @ocean_academy 4 года назад +4

      in _decideImageView method he didnt return the Image.file widget try using return keyword there

    • @tarunbinwal4691
      @tarunbinwal4691 4 года назад

      @@ocean_academy Thanks sir i was facing the same error

  • @erperejildo
    @erperejildo 4 года назад

    Thanks for the tutorial. On Flutter docs this is way more complicated but it's using a different package. What's the difference?

  • @akhilsharma2712
    @akhilsharma2712 5 лет назад +1

    thank you!

  • @BuruhKoding
    @BuruhKoding 4 года назад

    Thanks for tutorial

  • @mavbcn1790
    @mavbcn1790 5 лет назад

    Thanks for your video!
    I'd like to have an overlay on top of the camera to guide the user. it is possible?
    thanks

  • @maronvera7715
    @maronvera7715 4 года назад +1

    excelente vídeo!

  • @shubhammadhavii
    @shubhammadhavii 4 года назад +1

    code link?

  • @shogi23
    @shogi23 4 года назад

    "Column's children must not contain any null values, but a null value was found at index 0" ....this is the error that i got after completing tutorial ...can anyone help please
    my code
    Widget _zdecydujJakie() {
    if (imageFile == null) {
    return Text('nie dokonano wyboru zdjęcia');
    } else {
    Image.file(imageFile, width: 400, height: 400);
    }
    }
    @override
    Widget build(BuildContext context) {
    return new Scaffold(
    appBar: new AppBar(title: new Text('Zrób zdięcie')),
    body: Container(
    child: Center(
    child: Column(
    mainAxisAlignment: MainAxisAlignment.spaceAround,
    children: [
    _zdecydujJakie(),
    RaisedButton(
    onPressed: () {
    _showChoiceDialog(context);
    },
    child: Text('wybierz zdjęcie'),
    )
    ]),
    ),
    ));
    }
    }
    this error is displayed when I choose the appropriate photo in the gallery or b accept the photo taken with the camera. please help :)

  • @disadissanayake441
    @disadissanayake441 3 года назад

    Sir can I have a connection with u through facebook or something ?? Is there any group related to you. I want a quick reply

  • @ashinigam5222
    @ashinigam5222 3 года назад

    i just cant access pickImage and getImage

    • @harishram1054
      @harishram1054 3 года назад

      Pick image doesn't work on current version of imagepicker

    • @harishram1054
      @harishram1054 3 года назад

      Declare
      Final picker=imagepicker
      And use
      Picker.getImage()
      That should work👍

  • @FxTrader539
    @FxTrader539 4 года назад +1

    Video quality is bad, record high quality video like 720p, 1080p

    • @RetroPortalStudio
      @RetroPortalStudio  4 года назад

      Already available : ruclips.net/video/U_yqwBdb1jE/видео.html !
      Thank you ✌😁

  • @yashkalyan
    @yashkalyan 3 года назад

    bro source code please

  • @MrZawe
    @MrZawe 4 года назад +1

    add a git source pls

    • @RetroPortalStudio
      @RetroPortalStudio  4 года назад +1

      Here is the recent tutorial on this topic ruclips.net/video/U_yqwBdb1jE/видео.html ! Source code is linked in description ✌😁

    • @geethkuldeep6113
      @geethkuldeep6113 4 года назад

      @@RetroPortalStudio This video code is not uploaded?????in that video description .Please share it ASAP

  • @beramargroup2020
    @beramargroup2020 4 года назад

    Can you share code on Github?

    • @RetroPortalStudio
      @RetroPortalStudio  4 года назад

      I suggest you to take a look at this tutorial: ruclips.net/video/U_yqwBdb1jE/видео.html ✌😁