Flutter Tutorial for Beginners #34 - List View Builder

  Рет қаралды 238,711

Net Ninja

Net Ninja

Күн бұрын

Пікірлер
@mikolajhenzel
@mikolajhenzel 4 жыл бұрын
List from this episode (with Athens url mistake changed): List locations = [ WorldTime(url: 'Europe/London', location: 'London', flag: 'uk.png'), WorldTime(url: 'Europe/Athens', location: 'Athens', flag: 'greece.png'), WorldTime(url: 'Africa/Cairo', location: 'Cairo', flag: 'egypt.png'), WorldTime(url: 'Africa/Nairobi', location: 'Nairobi', flag: 'kenya.png'), WorldTime(url: 'America/Chicago', location: 'Chicago', flag: 'usa.png'), WorldTime(url: 'America/New_York', location: 'New York', flag: 'usa.png'), WorldTime(url: 'Asia/Seoul', location: 'Seoul', flag: 'south_korea.png'), WorldTime(url: 'Asia/Jakarta', location: 'Jakarta', flag: 'indonesia.png'), ];
@juniorlanga4505
@juniorlanga4505 4 жыл бұрын
Thank you so much. Saved me some time :)
@mikolajhenzel
@mikolajhenzel 4 жыл бұрын
@@juniorlanga4505 np :) but i didnt change mistake with berlin/athens, now its changed, so if you want it to work properly, you need to recopy this or change it on ur own
@juniorlanga4505
@juniorlanga4505 4 жыл бұрын
@@mikolajhenzel it worked like a charm... Thanks again.
@tahanabil8269
@tahanabil8269 4 жыл бұрын
You are awesome man ,Many thanks
@mikolajhenzel
@mikolajhenzel 4 жыл бұрын
@@tahanabil8269 np
@adewaleajayi3757
@adewaleajayi3757 4 жыл бұрын
Oh goodness, you are such a great teacher. You make flutter app development a breeze. Thank you so much for this course, you made me enjoy this so much. I would be saying bye bye to Ionic now. I am thrilled!!!!
@neophyte88
@neophyte88 3 жыл бұрын
For those getting an error with the flag images - stop the app by clicking the red square button on the left of the hot restart button ...then run it again from the run button at the top..(this worked for me - try changing assets/ to assets/images in the pubspec file...then change it back to assets/ and get dependencies - try running 'flutter clean' in a terminal
@studentshaikh1054
@studentshaikh1054 3 жыл бұрын
thank you very much it worked may god bless you
@nielfollero5
@nielfollero5 2 жыл бұрын
'flutter clean' ruined my code for fucks sake dude
@nielfollero5
@nielfollero5 2 жыл бұрын
ran 'flutter pub get' after that. still doesn't work
@neophyte88
@neophyte88 2 жыл бұрын
@@nielfollero5 man I'm sorry if it messed up your code... I commented what worked for me at the time and apparently people used it and it worked...I haven't worked on flutter in a while now...i guess I'll delete the comment if it's messing things up...sorry again
@nielfollero5
@nielfollero5 2 жыл бұрын
@@neophyte88 I tried googling about it. For some reason you have to save(ctrl-s) pubspec.yaml in order to make it work again. I was just shocked by those red underline I thought your comment was for trolling.
@kinga3684
@kinga3684 4 жыл бұрын
Wow! This tutorial is so awesome
@tahirdevlog2047
@tahirdevlog2047 5 жыл бұрын
I do not understand what kind of creature can give dislike to this tutorial
@vicyoslinuxofficial2607
@vicyoslinuxofficial2607 4 жыл бұрын
Me too.
@cemilakan
@cemilakan 4 жыл бұрын
doğru valla
@andreranulfo-dev8607
@andreranulfo-dev8607 4 жыл бұрын
Most of times, people give deslikes to the ads but instead of click on the icon in the ad, people make the mistake to click on the in-page deslike.
@tahirdevlog2047
@tahirdevlog2047 4 жыл бұрын
@@andreranulfo-dev8607 I have never heard that before, interesting...
@juniorlanga4505
@juniorlanga4505 4 жыл бұрын
@@andreranulfo-dev8607 Oh wow😂🤣
@Rainbowsaur
@Rainbowsaur 5 жыл бұрын
Thank you so much, I learnt alot. Explaining things people brush over like context, and it just makes sense now with a quick mention and example. Not just context too, you did much more. Cheers. Will be watching more.
@fawaazshaikh5997
@fawaazshaikh5997 Жыл бұрын
For those who are getting error for setting Title, try this : title: Text(locations[index].location!)
@CesarDominguez-y6s
@CesarDominguez-y6s Жыл бұрын
thank you..
@jonesgodwin123
@jonesgodwin123 Жыл бұрын
Thanks
@sudhanshudubey8099
@sudhanshudubey8099 Жыл бұрын
I loved your entire tutorial! Very structured and considered every aspect so that your students don't get confused or overwhelmed. Thank you so much for making this :) Also, one thing I personally found helpful is to press Alt + enter whenever I need to import some file by moving the cursor to the usage (red line in code).
@NetNinja
@NetNinja Жыл бұрын
That's great to hear Sudhanshu, glad it was helpful!
@centdxv2157
@centdxv2157 4 жыл бұрын
i just start my first flutter by you're tutorial,now im creating many apps thanks your good teacher.
@JavierLopez-xu9ro
@JavierLopez-xu9ro 4 жыл бұрын
This was a great tutorial. Thanks to your dedication I was able to understand Flutter! Awesome channel. Looking forward to more videos!
@NetNinja
@NetNinja 4 жыл бұрын
Glad it was helpful! :)
@Mark-nm9sm
@Mark-nm9sm Жыл бұрын
Very nice tutorial , 100% enjoyed it , finished it in 4 days sad that next one is the last video . One thing to note as I am greek, you put berlin in url of Athens xD regardless great series!
@alexboyd2693
@alexboyd2693 2 жыл бұрын
I just started with Flutter, and your videos are great! Any chance you might update them to accommodate the new null safety that has been introduced?
@dharmang
@dharmang 4 жыл бұрын
Finally wanted to learn List View a lot :D i dunno its my favourite widget lol at the moment. 🥳
@nehag4250
@nehag4250 Жыл бұрын
If you get an error as "Exception caught by image resource service" just change your image file type which is in png to jpg ...It Worked for me
@mojohit-games2208
@mojohit-games2208 4 жыл бұрын
You are very kind to make the time for this awesome course thank you
@maxijoker1
@maxijoker1 3 жыл бұрын
I know this is old but, does it make any difference that the "choose location" class is stateful even though it never uses the set state function? Great tutorials by the way!!! :)
@貴文河合
@貴文河合 5 жыл бұрын
You can get the square flag's images from the below link. (Egyptian) www.countryflags.com/en/egypt-flag-clipart.html (Germany) www.countryflags.com/en/germany-flag-clipart.html (Greece) www.countryflags.com/en/greece-flag-clipart.html (Indonesia) www.countryflags.com/en/indonesia-flag-clipart.html (Kenyan) www.countryflags.com/en/kenya-flag-clipart.html (Korea) www.countryflags.com/en/south-korea-flag-clipart.html (UK) www.countryflags.com/en/united-kingdom-flag-clipart.html (USA) www.countryflags.com/en/united-states-flag-image.html
@akshaysrivastava4304
@akshaysrivastava4304 Жыл бұрын
thanks man
@tokkicha4270
@tokkicha4270 4 жыл бұрын
Huhu bless u,, ur tutorials so good even noobs like me understand
@vamshikrishna4679
@vamshikrishna4679 5 ай бұрын
good tutorial 👍. Thank you so much for this course.
@NetNinja
@NetNinja 5 ай бұрын
You are welcome! :) don't forget to check out our update Flutter crash course too: kzbin.info/www/bejne/oJDVdHeZlL1goZo
@ahjed7397
@ahjed7397 3 жыл бұрын
if u have " The argument type 'WorldTime' can't be assigned to the parameter type 'String'. - 'WorldTime'" Just add .toString() to like here title: Text(locations[index].location.toString()),
@Adam-gw8jt
@Adam-gw8jt 3 жыл бұрын
thank you, kind man
@sajidAli-sz4kn
@sajidAli-sz4kn 3 жыл бұрын
Thanks man. Saved me time
@haziqafham6344
@haziqafham6344 3 жыл бұрын
very usefull man thanks a lot
@mohdhaikalrozhan6237
@mohdhaikalrozhan6237 3 жыл бұрын
thanks gang!!
@shafeeqbarram6360
@shafeeqbarram6360 3 жыл бұрын
thanks
@ahjed7397
@ahjed7397 3 жыл бұрын
if you cant load flags images just run on consle "flutter clean" Then save "pubspec.yaml" file >> ctrl+s
@juanpolanco9029
@juanpolanco9029 3 жыл бұрын
flutter: # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class. uses-material-design: true assets: - assets/ //it will read all files from assets folder
@addorespambasange6300
@addorespambasange6300 3 жыл бұрын
You don't know hoe much you help me. Thank you sooooooo much.
@4funrc11
@4funrc11 5 жыл бұрын
Thus far, I'm favoring the _List View Builder_ method. Thx! Actually, I have yet to see any method I don't like! lol
@ilyesmerzouk6682
@ilyesmerzouk6682 4 жыл бұрын
great one ;NOTE: you have used the BERLIN url for GREECE
@soumen_das
@soumen_das 4 жыл бұрын
Brother, you surely know how to teach. Thank you sensei 🙏
@majdkhasib76
@majdkhasib76 3 жыл бұрын
thank you so much man for the great content
@kameshparashar
@kameshparashar 3 жыл бұрын
I am making a news app which takes news from an api, so instead of hardcoding the available timezones like shown in the video I want it to update and add the news cards automatically from the api. How can I do it?
@bessamlegrand
@bessamlegrand 2 жыл бұрын
love you bro, all your videos are love
@orvildsilva6577
@orvildsilva6577 3 жыл бұрын
Amazing videos, Sir ! Waiting for advanced flutter playlist..
@mahdimsr
@mahdimsr 4 жыл бұрын
you are great, keep going man... . thanks for this best tutorial course
@user-or7ji5hv8y
@user-or7ji5hv8y 3 жыл бұрын
This is really well explained.
@karimahmed5393
@karimahmed5393 3 жыл бұрын
Wow 🇪🇬 Egypt Flag is Here :D :D
@arshadkhanSherani
@arshadkhanSherani 4 жыл бұрын
Great tutorial! I facing a problem actually I am working on a like button similar Facebook has. if a user has a login then he will be able to like or unlike the post. using a listview builder for it. if you have an idea or have code then please share it with me. Thanks
@vicyoslinuxofficial2607
@vicyoslinuxofficial2607 4 жыл бұрын
The best!!!!!! Thank youuuuuuuuu!!!
@utkarsh5667
@utkarsh5667 4 жыл бұрын
can you use .map function to access from list instead of listViewBuilder?
@Cho1279624
@Cho1279624 4 жыл бұрын
It's beautiful!!!!!
@7icod
@7icod 4 жыл бұрын
Hello man can you help me!! I'm trying to get two different data then put it in two listview in the same page in flutter
@tobotis2658
@tobotis2658 4 жыл бұрын
hi, thank you for the tutorial... but there is a error when i am using ListView.builder. It sais: horizontal viewport was given unbounded height. would be nice if someone could help me out. thanks.... P.S. i waant to use a horizontal listview
@pranavjeurkar6848
@pranavjeurkar6848 4 жыл бұрын
Hey i just tried to add some different locations in list like Asia/Kolkata but it not showing the correct time?It is showing half an hour late time.Can you just tell me why is it showing so?
@akshitkumar9402
@akshitkumar9402 4 жыл бұрын
yeah so utc_offset is only being calculated till the first digit i.e 5 so the +05:30 is being rounded off to 05 which is causing you the troble
@hemantchaurasia4087
@hemantchaurasia4087 4 жыл бұрын
to solve this calculate another offset for minutes and substring the 30 and then add it to now
@codingright
@codingright 4 жыл бұрын
Great video, thank you!!
@shubhamdalvi9347
@shubhamdalvi9347 3 жыл бұрын
can u make a tutorial on how to deal with listview builder when the data is of type "Future ". I dont know how to display this type of data using listview. Can u help plz.
@secreal6685
@secreal6685 4 жыл бұрын
That desktop background similar to soul land anime :D
@emmanuelsahrsewah
@emmanuelsahrsewah 4 жыл бұрын
Hi boss ninja... firstlythanks for the tutorial so far.. i have been following along until now i have got to a point that i am stuck.. loading the images from my assets folder into the cirlcle avatar in the leading properting in the Listtiles widgets don't seems to be working .. i am getting this error: Unable to load asset: assets/greece.png
@aat01
@aat01 4 жыл бұрын
have you added the image to your project? And if yes, then have you added it to your pubspec.yaml? check out this link: flutter.dev/docs/development/ui/assets-and-images
@erzloh
@erzloh 4 жыл бұрын
I got the same error here is what i did:I opened up the pubspec.yaml file, and in assets, under assets/, i added the full path of one image (assets/uk.png) then i saved and i retried and it worked. Then i could remove the full path code and just keep "assets/" and it still worked!
@emmanuelsahrsewah
@emmanuelsahrsewah 4 жыл бұрын
@@erzloh YEah sure.. thanks that fixed it
@breathandrelax2
@breathandrelax2 4 жыл бұрын
@@erzloh thank you. it solved mine problem too.
@hardiklakhalani6268
@hardiklakhalani6268 3 жыл бұрын
@@erzloh This worked!
@int-64
@int-64 5 жыл бұрын
You added this video twice in the playlist
@girishbhargava6367
@girishbhargava6367 2 жыл бұрын
Thanks for the whole series, I am just unable to understand, why is it showing the times of south and North American countries wrong. If anyone knows the reason, please tell me.
@ammadhassan6702
@ammadhassan6702 4 жыл бұрын
it shows a blank grey page when I run this app on my android. please reply . it will be a great help. thanks
@udaynj
@udaynj 8 ай бұрын
How is the context able to know what the locations list is and iterate through that list? That's not clear to me. Can someone help?
@williamtheodorlehn-schiler7224
@williamtheodorlehn-schiler7224 4 жыл бұрын
Does anyone know if it is possible to position a list of widget? I want to place a list of images in specific positions, any help?
@aishahasan5385
@aishahasan5385 3 жыл бұрын
Thanks, it was a great video Can you make a video on GridView as well please.
@muhammedanaspk2972
@muhammedanaspk2972 3 жыл бұрын
I always getting an error of height while returning Container inside listview.builder??
@ashiqkhanyt
@ashiqkhanyt 3 жыл бұрын
You may use this asset for flags. iconscout.com/icon-pack/country-flags
@KaleshGharKa
@KaleshGharKa Жыл бұрын
Hey everyone, I have one small doubt,, when I write Asia/Kolkata at that time it showing 30minutes behind of current time. why is it happening?
@parthdasawant
@parthdasawant Жыл бұрын
because Asia/Kolkata has offset is +5:30 where London has +01:00 and the method shown in video only considered the hour part of the offset.
@parthdasawant
@parthdasawant Жыл бұрын
String offset = data['utc_offset'].substring(1,3); String min_offset =data['utc_offset'].substring(4,6); //NEW CODE DateTime now = DateTime.parse(datetime); now = now.add(Duration(hours: int.parse(offset), minutes: int.parse((min_offset)))); //NEW CODE
@vijaykumarsunkari369
@vijaykumarsunkari369 3 жыл бұрын
How to put two listview builders in the body?
@neb542
@neb542 3 жыл бұрын
Anyone else having list no longer usable due to depreciation? THX in advance
@GuilhermeSBerni
@GuilhermeSBerni 4 жыл бұрын
Guys, if someone is having problems with finding flags, there is a site called countryflags.com. It is excellent!
@GuilhermeSBerni
@GuilhermeSBerni 4 жыл бұрын
Man, you are awesome
@yashraut19
@yashraut19 4 жыл бұрын
@@GuilhermeSBerni lol
@ishaanpuri901
@ishaanpuri901 4 жыл бұрын
whats the difference between onTap and onPressed
@jona7999
@jona7999 5 жыл бұрын
Hello you can start with onesignal ios and android 🙏
@sarahismail-ob4is
@sarahismail-ob4is 4 жыл бұрын
Hai, how do I make a list that contains classes ? Is it possible ? Thank you !
@piyushkumar-vy9cq
@piyushkumar-vy9cq Жыл бұрын
caught error:NoSuchMethodError: The method 'substring' was called on null. Receiver: null Tried calling: substring(1, 3) can someone help me out with this error
@TheCrashToaster
@TheCrashToaster 4 жыл бұрын
Think you messed up with Athen and Berlin in your locations list haha
@sandraperez2698
@sandraperez2698 4 жыл бұрын
Thank you :)
@vigneshsrinivasan9692
@vigneshsrinivasan9692 3 жыл бұрын
the flags are not being displayed for me. "Exception caught by image resource service The following assertion was thrown resolving an image codec: Unable to load asset: assets/uk.png" I get this message for all the images. The paths are correct
@codemantis5986
@codemantis5986 3 жыл бұрын
did you solve this getting the same error
@callowclay3021
@callowclay3021 2 жыл бұрын
I have zero idea why this worked, but I added assets/uk.png directly to pubspec, then I changed the isDaytime bgImage to uk.png. That forced it to load. then I was able to delete the assets/uk.png line in pubspec (leaving just assets/), change all the code back, and now it worked for some reason.
@Mrugal7
@Mrugal7 2 жыл бұрын
@@callowclay3021 I am still facing the same issue .
@Mrugal7
@Mrugal7 2 жыл бұрын
@@codemantis5986 Were you able to solve ?
@funcloud1866
@funcloud1866 4 жыл бұрын
Thank you!
@eslamkhaled4919
@eslamkhaled4919 3 жыл бұрын
Anyone has a problem with the "null to bool " thing ? If anyone has a solution for this please tell me as i'm stuck in this problem for 2 weeks now !
@yenoshome
@yenoshome 3 жыл бұрын
me too, i can't seem to find the solution
@utkarsh_shh
@utkarsh_shh 3 жыл бұрын
try to write late before bool
@DataSet
@DataSet Жыл бұрын
I found the solution. Sorry I am 2 years late, but let me know if you still need the answer.
@tahirdevlog2047
@tahirdevlog2047 5 жыл бұрын
Thank yu sensei
@hitechstudios4290
@hitechstudios4290 4 жыл бұрын
how to show ads between a nth element
@aliyaghi2261
@aliyaghi2261 4 жыл бұрын
hello shaun . i am trying to make an app that get data from sharedpreferences and put then in a list then show them with an listview builder . lets say that the length of list is N, my problem is that the listview shows only N-1 items .
@amitsrivastava4584
@amitsrivastava4584 4 жыл бұрын
I faced a problem with this tutorial. When I was loading the country flag, my choose location screen stopped functioning. This was because it couldn't locate the image. This can be solved: 1. By adding manually all the location of countries flag in pubspec.yaml. 2. In home.dart, I replaced $bgImage with greece.png, hot restart. Then I replaced it with uk.png and so on. Finally I reverted back to $bgImage. I don't know why but it worked. I think that choose_location.dart is unable to find the file but once we use the image file it is able to locate. Can anyone tell why this problem arises.
@hauntedspear5728
@hauntedspear5728 4 жыл бұрын
yup i also have this error, what I do is 1. rename the assets/ to assets/images. Click save and get dependencies 2. Then rename back to assets/ again. Click save and get dependencies 3. Go to android studio terminal, and run flutter clean I think this error occur when we move the image to assets folder and try to get dependencies, where the android studio cannot load a lot of image at the same time I hope this help, this is my reference stackoverflow.com/questions/53659809/fluttererror-unable-to-load-asset
@astronautpolar596
@astronautpolar596 4 жыл бұрын
@@hauntedspear5728 thanks. you save my day!
@akashdeshpande
@akashdeshpande 4 жыл бұрын
Same problem. Stopped the app, hot restarted, problem solved!
@kenny4971
@kenny4971 4 жыл бұрын
Faced the same problem, simply changed a random thing on pubspec and then did get dependencies, it worked!
@Mrugal7
@Mrugal7 2 жыл бұрын
@@hauntedspear5728 I am still unable to do so .
@tianchenghuang973
@tianchenghuang973 4 жыл бұрын
Devil lies in the details ;)
@quochungnguyen6664
@quochungnguyen6664 4 жыл бұрын
why we only have Berlin and Nairobi here :))
@nosliw9911
@nosliw9911 2 жыл бұрын
If you are getting this error "I/vndksupport(28805): sphal namespace is not configured for this process. Loading /vendor/lib64/hw/gralloc.msm8998.so from the current namespace instead" 1. Install the app 2. Then restart the device. Then open the app. It works perfect. Been told it's a security issue with regards to android settings.
@ericvaneldik7331
@ericvaneldik7331 4 жыл бұрын
is it just me or is the git branch containing the material completly empty? For the once looking for flags: github.com/hjnilsson/country-flags
@disizanand
@disizanand 4 жыл бұрын
It's all there in the master branch inside any of the size directories.
@ericvaneldik7331
@ericvaneldik7331 4 жыл бұрын
@@disizanand The url I provided is a different one: The NET Ninja github is found here: github.com/iamshaunjp/flutter-beginners-tutorial but only contains a Readme.md file. I looked a bit further and in a branch called Lesson 34 the files can be found: github.com/iamshaunjp/flutter-beginners-tutorial/tree/lesson-34/world_time_app/assets
@satyamedavarapu1157
@satyamedavarapu1157 5 жыл бұрын
Source code pls
@oussamakhalfi1751
@oussamakhalfi1751 5 жыл бұрын
description
@andreranulfo-dev8607
@andreranulfo-dev8607 4 жыл бұрын
Wow!!!!!!!!!!
@ademineshat
@ademineshat 5 жыл бұрын
Maybe you realized that this video is duplicated :)
@sumitshukla6436
@sumitshukla6436 4 жыл бұрын
How?
@saadabbasi7968
@saadabbasi7968 2 жыл бұрын
is any one else getting these errors every time u edit the source code? caught error: HandshakeException: Connection terminated during handshake E/flutter (19845): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: LateInitializationError: Field 'isDayTime' has not been initialized.
@harshbhansali1327
@harshbhansali1327 2 жыл бұрын
change flutter to version >=2.11.0
Flutter Tutorial for Beginners #35 - Updating the Time
13:01
Net Ninja
Рет қаралды 202 М.
Flutter Tutorial for Beginners #33 -Ternary Operators
14:54
Net Ninja
Рет қаралды 132 М.
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
LISTVIEW & BUILDER • Flutter Widget of the Day #04
9:06
Mitch Koko
Рет қаралды 144 М.
TOP 12 ListView Widgets | Flutter Tutorial
19:28
HeyFlutter․com
Рет қаралды 35 М.
Listview builder Flutter - Optimized, on-demand dynamic list of items
10:17
Provider 📱 Simple State Management • Flutter Tutorial
5:48
Flutter Tutorial For Beginners In 1 Hour
1:00:00
Flutter Mapp
Рет қаралды 453 М.