@@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
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
@@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
@@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.
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!!!!
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
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.
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).
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
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()),
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!!! :)
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!
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?
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?
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
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
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.
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.
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
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
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
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!
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.
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
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
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.
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 .
@@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
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.
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.
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'),
];
Thank you so much. Saved me some time :)
@@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
@@mikolajhenzel it worked like a charm... Thanks again.
You are awesome man ,Many thanks
@@tahanabil8269 np
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
thank you very much it worked may god bless you
'flutter clean' ruined my code for fucks sake dude
ran 'flutter pub get' after that. still doesn't work
@@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
@@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.
For those who are getting error for setting Title, try this : title: Text(locations[index].location!)
thank you..
Thanks
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!!!!
I do not understand what kind of creature can give dislike to this tutorial
Me too.
doğru valla
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.
@@andreranulfo-dev8607 I have never heard that before, interesting...
@@andreranulfo-dev8607 Oh wow😂🤣
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
thanks man
Wow! This tutorial is so awesome
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.
i just start my first flutter by you're tutorial,now im creating many apps thanks your
good teacher.
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).
That's great to hear Sudhanshu, glad it was helpful!
This was a great tutorial. Thanks to your dedication I was able to understand Flutter! Awesome channel. Looking forward to more videos!
Glad it was helpful! :)
if you cant load flags images just run on consle
"flutter clean"
Then save "pubspec.yaml" file >> ctrl+s
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
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
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?
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()),
thank you, kind man
Thanks man. Saved me time
very usefull man thanks a lot
thanks gang!!
thanks
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!!! :)
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!
great one ;NOTE: you have used the BERLIN url for GREECE
You are very kind to make the time for this awesome course thank you
good tutorial 👍. Thank you so much for this course.
You are welcome! :) don't forget to check out our update Flutter crash course too: ruclips.net/video/j_rCDc_X-k8/видео.html
Finally wanted to learn List View a lot :D i dunno its my favourite widget lol at the moment. 🥳
You don't know hoe much you help me. Thank you sooooooo much.
Huhu bless u,, ur tutorials so good even noobs like me understand
Thus far, I'm favoring the _List View Builder_ method. Thx!
Actually, I have yet to see any method I don't like! lol
thank you so much man for the great content
Brother, you surely know how to teach. Thank you sensei 🙏
love you bro, all your videos are love
It's beautiful!!!!!
This is really well explained.
Amazing videos, Sir ! Waiting for advanced flutter playlist..
The best!!!!!! Thank youuuuuuuuu!!!
you are great, keep going man... . thanks for this best tutorial course
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?
Wow 🇪🇬 Egypt Flag is Here :D :D
Great video, thank you!!
That desktop background similar to soul land anime :D
You added this video twice in the playlist
Thank you :)
Thank you!
Thanks, it was a great video
Can you make a video on GridView as well please.
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?
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
to solve this calculate another offset for minutes and substring the 30 and then add it to now
You may use this asset for flags. iconscout.com/icon-pack/country-flags
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
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
can you use .map function to access from list instead of listViewBuilder?
Thank yu sensei
Anyone else having list no longer usable due to depreciation?
THX in advance
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
Think you messed up with Athen and Berlin in your locations list haha
Guys, if someone is having problems with finding flags, there is a site called countryflags.com. It is excellent!
Man, you are awesome
@@GuilhermeSBerni lol
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.
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?
Devil lies in the details ;)
Wow!!!!!!!!!!
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.
Hello you can start with onesignal ios and android 🙏
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?
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.
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
I always getting an error of height while returning Container inside listview.builder??
whats the difference between onTap and onPressed
it shows a blank grey page when I run this app on my android. please reply . it will be a great help. thanks
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
How to put two listview builders in the body?
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
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
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!
@@erzloh YEah sure.. thanks that fixed it
@@erzloh thank you. it solved mine problem too.
@@erzloh This worked!
Hai, how do I make a list that contains classes ? Is it possible ? Thank you !
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?
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 !
me too, i can't seem to find the solution
try to write late before bool
I found the solution. Sorry I am 2 years late, but let me know if you still need the answer.
how to show ads between a nth element
why we only have Berlin and Nairobi here :))
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.
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
@@hauntedspear5728 thanks. you save my day!
Same problem. Stopped the app, hot restarted, problem solved!
Faced the same problem, simply changed a random thing on pubspec and then did get dependencies, it worked!
@@hauntedspear5728 I am still unable to do so .
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
did you solve this getting the same error
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.
@@callowclay3021 I am still facing the same issue .
@@codemantis5986 Were you able to solve ?
Source code pls
description
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 .
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
It's all there in the master branch inside any of the size directories.
@@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
Maybe you realized that this video is duplicated :)
How?
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.
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.
change flutter to version >=2.11.0