Hello kilo loco, greetings from Colombia, I just want to leave you my most sincere thanks and respect for making such high quality content, especially I take great advantage of your flutter publications, since it is what I am currently applying, thank you very much friend and God bless
this series helped me a lot with writing one of my SwiftUI apps in flutter for android, I learned so much, and it is only day 8, I'm actually excited now, thank you sir.
I have a problem with null safety! You tell at 27:20 that programmingLanguages may be null, but do not handle null safety. You just go on and leave the subject unhandled. When I start my app it gives me a null object at the .map Like this: Exception has occurred. NoSuchMethodError (NoSuchMethodError: The method 'map' was called on null. Receiver: null Tried calling: map(Closure: (String) => ProgrammingLanguage)) At least it must start with an empty List of Strings. Can I create a dummy var with empty List of Strings? Obvious not I get runtime error when doing this const emptyLanguage = []; final programmingLanguagesIndicies = preferences.getStringList('programmingLanguages') ?? emptyLanguage; I am stuck! Anyone who can explain to overcome this and come from the ground up?
This video series doesn't cover null safety as it was not on stable at the time and is still currently an opt in feature. You may be able to solve the problem by using the ? in a few places to accommodate for null safety, but I haven't used it yet personally in dart. If I had to guess, the code should look something like this: final programmingLanguages = programmingLanguagesIndicies? .map((stringIndex) => ProgrammingLanguage.values[int.parse(stringIndex)]) .toSet() ?? Set() The idea here being that the programmingLanguagesIndicies is nullable and if the value is null, then return an empty Set
if you are talking about the null safety in the settings, then try using the "??" like this. isEmployed: isEmployed ?? true); username: username ?? "it's null",
Try to click the continue debug button while debugging, then select the checkbox option in your simulator, then save. That's what I fix. Hopefully, it can help. I think the first run there is no saved data yet, so it catches the empty set and popup the warning. Follow my step, hope next time can run normally. If any better ways to fix it, please let me know. Cheers
You can store the enums as String or ListString as the toString of the values, and restore them using this mapping, as demonstrated here in a dartpad snippet: void main() { var inStorage = Language.Flutter.toString(); var string2Language = Language.values.asMap().map((k,v) => MapEntry("$v",v)); var inProg = string2Language[inStorage]; print(inProg == Language.Flutter); } enum Language { Flutter, Dart, JavaScript, Perl }
Thanks a lot for the tutorials, I'm enjoying and learning a lot. Can you please make a video on backing up & restoring data stored in sqflite and also exporting and importing of data through csv files.
Thanks for this lesson, I was wondering if I change the values too many times do they keep the old records or do they overwrite them? And if it is kept and repeated, how can I delete the old values, or in other words, how can I replace the value according to the key? Thanks again.
I had a problem importing shared_preferences. When I added the import 'package:shared_preferences/shared_preferences.dart'; into my code, the app crashes and 60% of dart started eating my cpu.
after converting to apk release file installing on an android phone not working not retreiving the API. but working fine in emulator. what is the reason anybody??
Thanks a lot for the tutorial, Can you please refactor the code to use a state management library like Riverpod or Bloc instead of using SetState? thanks
Hello kilo loco, greetings from Colombia, I just want to leave you my most sincere thanks and respect for making such high quality content, especially I take great advantage of your flutter publications, since it is what I am currently applying, thank you very much friend and God bless
Just stumbled upon your channel. Love the length of these videos. Great explanations. Thanks!
it's interesting going through these and implementing null safety along the way too
this series helped me a lot with writing one of my SwiftUI apps in flutter for android, I learned so much, and it is only day 8, I'm actually excited now, thank you sir.
i guess Im kinda randomly asking but do anyone know a good website to stream new tv shows online ?
@Brady Kaiser Meh try Flixportal. just google after it:P -guillermo
@Guillermo Trace Thanks, I went there and it seems like they got a lot of movies there :D I really appreciate it!!
@Brady Kaiser Happy to help :D
I have a problem with null safety! You tell at 27:20 that programmingLanguages may be null, but do not handle null safety. You just go on and leave the subject unhandled. When I start my app it gives me a null object at the .map Like this:
Exception has occurred.
NoSuchMethodError (NoSuchMethodError: The method 'map' was called on null.
Receiver: null
Tried calling: map(Closure: (String) => ProgrammingLanguage))
At least it must start with an empty List of Strings.
Can I create a dummy var with empty List of Strings? Obvious not I get runtime error when doing this
const emptyLanguage = [];
final programmingLanguagesIndicies =
preferences.getStringList('programmingLanguages') ?? emptyLanguage;
I am stuck! Anyone who can explain to overcome this and come from the ground up?
This video series doesn't cover null safety as it was not on stable at the time and is still currently an opt in feature. You may be able to solve the problem by using the ? in a few places to accommodate for null safety, but I haven't used it yet personally in dart. If I had to guess, the code should look something like this:
final programmingLanguages = programmingLanguagesIndicies?
.map((stringIndex) => ProgrammingLanguage.values[int.parse(stringIndex)])
.toSet()
?? Set()
The idea here being that the programmingLanguagesIndicies is nullable and if the value is null, then return an empty Set
@@Kilo_Loco No its not working ..
if you are talking about the null safety in the settings, then try using the "??" like this. isEmployed: isEmployed ?? true); username: username ?? "it's null",
Try to click the continue debug button while debugging, then select the checkbox option in your simulator, then save. That's what I fix. Hopefully, it can help. I think the first run there is no saved data yet, so it catches the empty set and popup the warning. Follow my step, hope next time can run normally. If any better ways to fix it, please let me know. Cheers
Did you found the solution? i'm also stuck in here
And I want to re-emphasize... your videos are great! Thank you for doing them!
Glad you like them!
You can store the enums as String or ListString as the toString of the values, and restore them using this mapping, as demonstrated here in a dartpad snippet:
void main() {
var inStorage = Language.Flutter.toString();
var string2Language = Language.values.asMap().map((k,v) => MapEntry("$v",v));
var inProg = string2Language[inStorage];
print(inProg == Language.Flutter);
}
enum Language { Flutter, Dart, JavaScript, Perl }
Thanks a lot for the tutorials, I'm enjoying and learning a lot. Can you please make a video on backing up & restoring data stored in sqflite and also exporting and importing of data through csv files.
idk why m getting an error at newValue... it doesn't show anything except red line ... any idea ??
It's an object error. Just change it from newValue to newValue as Gender.
Bravo!👌
Thanks for this lesson, I was wondering if I change the values too many times do they keep the old records or do they overwrite them? And if it is kept and repeated, how can I delete the old values, or in other words, how can I replace the value according to the key? Thanks again.
y we didn't had any parameter in onchanged in checkboxlist
best video please continue with flutter videos Thanks in advance subscribed
Best to have those key strings as const String then. :)
I am new to flutter, what is “dirty” in his code
And thank you for TextButton!
Thank you very clear !
great video man thank you
Amazing stuff! Thank you so much.
Glad you liked it!
I had a problem importing shared_preferences. When I added the import 'package:shared_preferences/shared_preferences.dart'; into my code, the app crashes and 60% of dart started eating my cpu.
Update: Flutter released version 2.5 and upgrading to it made things work normally again.
bro, how do you get into the database?
after converting to apk release file installing on an android phone not working not retreiving the API. but working fine in emulator. what is the reason anybody??
Thanks a lot for the tutorial, Can you please refactor the code to use a state management library like Riverpod or Bloc instead of using SetState? thanks
I'll be covering state management in the coming weeks 😉
kudos!!
Thanks so cool video ) Ez like ^) Uh Models Uh.
4:15 lol ... "other"