Flutter: Import profile images form Camera and Gallery || Image Picker || 25

Flutter: Import profile images form Camera and Gallery || Image Picker || 25

Dev Stack

4 года назад

66,683 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@XO_GG
@XO_GG - 17.11.2023 05:04

Where is i can download the app?

Ответить
@sajeevvasudevan6301
@sajeevvasudevan6301 - 16.07.2023 20:19

void takephoto(ImageSource source)async{
final pickedFile=await picker.pickImage(
source:source,
);

setState(() {
_imagefile=pickedFile as PickedFile;
}); this my code

Ответить
@sajeevvasudevan6301
@sajeevvasudevan6301 - 16.07.2023 20:18

i get an error lateInitializatationError Filed _imagefile@27144298 has not been initialized , how it solve please help me sir

Ответить
@Becoder15604
@Becoder15604 - 07.06.2023 20:15

That's how to teach thank u sir for such amazing and benifical video

Ответить
@shadmannehalkhan6845
@shadmannehalkhan6845 - 23.05.2023 18:55

thanks

Ответить
@pragatsharma1580
@pragatsharma1580 - 30.03.2023 23:06

The non-nullable local variable '_imageFile' must be assigned before it can be used.
Try giving it an initializer expression, or ensure that it's assigned on every execution
it is giving this error how to fix

Ответить
@sumantrkurse1518
@sumantrkurse1518 - 23.02.2023 16:09

How can we do with Camera plugin package?

Ответить
@joeysupply
@joeysupply - 12.09.2022 11:42

Thank you sir. for your video.

Ответить
@areebafarooq2694
@areebafarooq2694 - 27.05.2022 11:32

is this emulator or you are using real device ???

Ответить
@cristianduran4676
@cristianduran4676 - 19.05.2022 20:37

Can u do this with null safety, please?

Ответить
@GuyNChai
@GuyNChai - 05.05.2022 19:20

Dude get a mic, i have to tur of captions to listen o what you are saying 😶

Ответить
@ilmemaab3171
@ilmemaab3171 - 25.03.2022 11:37

Thanks a lot!!! it really helped me !

Ответить
@neeraj2626
@neeraj2626 - 22.03.2022 09:29

Hi, thanks for the greate video.
I'm very new to flutter, was following your video and getting this error.
Any suggestions? Thanks in advance!

Code:
late PickedFile _imageFile;
....

backgroundImage: _imageFile == null
? AssetImage("lib/assets/profile.png")
: FileImage(File(_imageFile.path)),
.....

Error:
Try correcting the name to the name of an existing method, or defining a method named 'File'.
: FileImage(File(_imageFile.path)),
^^^^
lib/pages/ProfilePage.dart:149:15: Error: The argument type 'Object' can't be assigned to the parameter type
'ImageProvider<Object>?'.
- 'Object' is from 'dart:core'.
- 'ImageProvider' is from 'package:flutter/src/painting/image_provider.dart'
('/C:/Program%20Files/flutter/packages/flutter/lib/src/painting/image_provider.dart').
? AssetImage("lib/assets/profile.png")

Ответить
@zareenharoon4287
@zareenharoon4287 - 17.02.2022 16:06

hello nice work..
please solve my problem..
i am getting eroor here

CircleAvatar(
radius: 80.0,
backgroundImage:
_imageFile == null
? AssetImage("images/Logo.jpg")
: FileImage(File(_imageFile.path)),
),

_image file not defined error not nullable instant field
also cotext error as wll. it says undefined name

child: InkWell(
onTap: () {
showModalBottomSheet(
context: context,
builder: ((builder) => bottomSheet()),
);

Ответить
@johnhabibpour8375
@johnhabibpour8375 - 26.11.2021 06:50

Hi Dev, Thanks for your awesome video, Can I ask you why my code gives error,
CircleAvatar(
radius: 80.0,
backgroundImage: _imageFile == null
? AssetImage('images/aran.jpg')
: FileImage(File(_imageFile.path)),
),
exactly last 3 lines has error,
Thanks

Ответить
@ankitaumredkar8368
@ankitaumredkar8368 - 16.10.2021 21:04

Sir I get am error that getImage is undefined how should i resolve

Ответить
@bylkaminou517
@bylkaminou517 - 20.09.2021 18:25

Thanks for the tutorial

I have an error in this line
backgroundImage: _imageFile==null? AssetImage("assets/profilphoto.png") :FileImage(File(_imageFile.path)),


The argument type 'Object' can't be assigned to the parameter type 'ImageProvider<Object>?'.

could someone help me please !!!

Ответить
@ShivamGupta-sx4lk
@ShivamGupta-sx4lk - 03.09.2021 16:12

backgroundImage: _imageFile == null
? AssetImage("assets/blank.png")
: FileImage(File(_imageFile.path)),

This line is giving error please tell me how to solve it

Ответить
@TYNEPUNK
@TYNEPUNK - 01.09.2021 02:13

great stuff

Ответить
@fahadmustafa650
@fahadmustafa650 - 23.08.2021 11:02

Love you Sir! I thought there is no FileImage in backgrounImage. Thanks for introducing me

Ответить
@SAGskills
@SAGskills - 10.08.2021 17:15

how to validate profile pic if user not select profile image? a message should display "please select picture" how to to that validation

Ответить
@saileshverma7353
@saileshverma7353 - 09.07.2021 17:29

Why im not able to import "dart:io"
While converting pickedimage type to file type
Pls Help!!!!!!!!!

Ответить
@digambardiggas2172
@digambardiggas2172 - 07.06.2021 15:27

thank you very much its very useful

Ответить
@lyleverything1767
@lyleverything1767 - 19.05.2021 14:33

where is the link for the github repo for this ?

Ответить
@yashratnaparkhi4529
@yashratnaparkhi4529 - 13.05.2021 20:07

Is there any way to save the pic we selected as when I am starting my app again. It gets set to original state and not the one I selected

Ответить
@fathimashafana4881
@fathimashafana4881 - 17.04.2021 17:43

Wow such a awesome video. U r such a great teacher. I understood the way u explained!! Plz dont change the way u make videos. Its just perfect !! Thankyou so much for making this video. I followed ur video from start to end. but I dont kno what did i miss out. when clicking on camera and gallery icon nothing is happening and no error is also shown. what to do? btw I have liked and subscribed ;)

Ответить
@LoveIsLifeTurkishIndia
@LoveIsLifeTurkishIndia - 10.04.2021 16:50

Can you share the source code please..

Ответить
@nerminhussein2634
@nerminhussein2634 - 26.03.2021 17:57

I have a proble in line : File(imagefile.path) how solve it please?

Ответить
@arbajansari3052
@arbajansari3052 - 23.03.2021 10:19

can i get source code? plz

Ответить
@saadsaleem3331
@saadsaleem3331 - 28.01.2021 21:41

thank you for making this good video

Ответить
@saadsaleem3331
@saadsaleem3331 - 28.01.2021 21:41

good work bro

Ответить
@ibrahimtaramsah4450
@ibrahimtaramsah4450 - 15.01.2021 23:48

Thanks, But how can i add multiple image in form

Ответить
@mustafaninyolu
@mustafaninyolu - 29.12.2020 21:58

thanks again!

Ответить
@pradyumanpareek2972
@pradyumanpareek2972 - 23.12.2020 12:43

Thank You!!!!

Ответить
@hunter85070
@hunter85070 - 25.11.2020 08:28

I LOVE YAAAAAAAA!!! THAAAAAAANKS!

Ответить
@user-cs7vp9cn2d
@user-cs7vp9cn2d - 29.10.2020 18:53

Hello man! Its best video - you are very cool !!!!)))) its works super!!!!

Ответить
@saileshverma1942
@saileshverma1942 - 28.10.2020 14:03

when i m using form widget and the image picker i m not able to save the values of the textfield please resolve my problem SIR!!

Ответить
@DevStack
@DevStack - 23.10.2020 07:29

Can you guys help me to get 3k please 🙏🙏🙏🙏

Ответить
@hectorprx
@hectorprx - 21.09.2020 15:00

Thanks

Ответить
@tracoolgaming4829
@tracoolgaming4829 - 18.09.2020 09:09

you should also show the imports also the setstate() was required to be defined as a separate function i think you missed it because is was producing as error in my code

Ответить
@ccarnagee7867
@ccarnagee7867 - 02.09.2020 22:00

But when you build an APK the image picker doesn't work... Most of the time app doesn't open gallery or camera... In debug mode everything works fine...

Ответить
@zohairmoufakkir9501
@zohairmoufakkir9501 - 04.08.2020 14:19

please give me the code source

Ответить
@josueguessennd51
@josueguessennd51 - 27.07.2020 18:52

Awesome

Ответить