Flutter Tip at 34:15 - If you make changes to a const or final variable than while hot reload only const changes will reflect because its a stateful hot reload which maintain the state of the object having the final state. Looking forwards to this small tips.
Andrew, you really need to learn some IntelliJ IDEA shortucts.... If you used a multi-line caret you would have edited all those field, from the API, in no time. Just multi-line caret... Then press "home", then cmd+arrow right (at least in windows)... Then cmd+shift+arrow right.. Then delete, and you have all the fields....then "home".... Then type "String get"... Then "end" and ";" and you are almost done, just need to change some Strings for int and etc.
The http response code ('res') is inspected twice, the second check should be 'storyRes'. And could you elaborate if all the HTTP calls would fail, the test would still succeed or not? Great show btw! I learn a lot... (not only flutter/dart)
Looking forward for a tutorial on State Management. Almost all apps get new state from web, subscribe to state change, update state back to web. If will be great if you can give an idea on best practices to achieve these tasks.
I couldn't find one thing in future builder is that, how do I change a single card's text on button click in the same card. All the cards are inside list which is being created using Json data from inside future builder, Now I have used setState() but it's refreshing whole future builder and refetching data from the server. Any ideas? I am creating an e-commerce like app where user can increase or decrease the quantity from each service. All the services are being fetched using FutureBuilder, Now I can't make the increment and decrement counter make work with increasing text on each cards.
gist.github.com/50shashwat/e2ea92c2f376e25c09e0bddbd8163a96 on line 274 I am using setState(){} to update the next container on line 332. I want to update the text of card using a button where the text and button both are in List build using FutureBuilder .
So handy. It's called "Select Next Occurrence." IntelliJ (and therefore Android Studio) has offered it for a while: blog.jetbrains.com/idea/2014/03/intellij-idea-13-1-rc-introduces-sublime-text-style-multiple-selections/
I currently have an Socket.io server working with a web site, and I would like to develop an app with flutter that can stream the server content, I've found that this communication with Flutter and Socket.io is not possible right now, my question is wich websockets server could I use in oder to have this desired communication?
What, in particular, are you missing? Flutter runs well on these devices but I know there are things that need more love. I wonder what you consider the most important issues.
Filip Hráček It runs well, yes, but I would be interested to see layouts designed to easily switch to multiple panels, like how an email client would look. For example, Gmail on mobile has the list of emails which can be opened up to show the email, but on a Chromebook/Tablet it expands out to two different panels
This is a great show. I start learning dart and flutter to develop app for android. But I can not find information about @nullable annotation. Is @nullable is standard annotation and if so where is information about it?
Hi, my parseArticle() works well under `Test` but it does not work in the App. I get an error while performing this `serializers.deserializeWith(Article.serializer, parsed);` Error: type '_$Article' is not a subtype of type 'Article' in type cast Can you help me out. Again, It works perfectly fine under `Test`
I'm only 21 mins in so this comment may be premature but the set up for the built value stuff with going back and forth copying/pasting (seemingly) random lines of code into your Article class is super confusing. The on-the-fly coding in this series is great, but without some overall discussion about exactly what and why you're doing what you're doing it's not very coherent. Am I supposed to remember what random github issue you went to to grab the lines of code for the plugin, and serializer, etc?
I didn't really understood the advantages of using built_value instead of other, simpler, solutions like json_serializer, i'm not familiarized with the "built value" concept at all and I don't see exactly how could it improve the quality of the code or the code perfomance or even the coding speed at all. For the moment I'll be going with json_serializer but will keep an eye in the build_value thing just in case I see a real advantage of using it.
If you're just looking for serialization, json_serializable is perfect. The built_value package is really meant to make immutable objects that behave like value types, and it gets serialization almost as a side effect. There are advantages and disadvantages of using immutable data models, some of which you can see here: www.quora.com/What-are-the-advantages-and-disadvantages-of-immutable-data-structures
It was a good episode. I would like to Know if serializations with build_value could manage complex json structure, I mean a List inside a map o viceversa, 2 level of list. To be more precise I using Drupal 8 as backend, in this APIs for nodes or user has more complex JSON structure
Yes, you can use built_value with nested object structures (e.g. one object has a list of another, or something like that). You can check out our json sample for some example code: github.com/flutter/samples.
Why won't you include the State management tutorial in the documentation? We always read the documentation in the official website. thanks! Request: Emily Fortuna to be in the next episode of the boring flutter development sometime. She really loves memes. just to spice it up 🤣
What is the difference between import 'package:boring_show_example/src/serializers.dart'; and import 'serializers.dart'; ??? Because I had a nasty problem where my json wouldn't parse, and it was because of this import! It was throwing "type '_$Article' is not a subtype of type 'Article' in type cast" no matter what... I was following what you were doing, and had the same folder structure. Everything was the same except for this import. Couldn't figure out what was wrong until I found your code in github and started comparing it line by line with mine.
Either one is fine; the important thing is not to mix them. Dart considers those two imports to be declaring two different namespaces (even though they ultimately point to the same file), and will create two different sets of class definitions for them. The team is considering a change to the system that'll detect and fix this, but in the meantime I recommend just standardizing on one approach (I always use `package:`, myself).
@@andrewbrogdon558 I was using everywhere the import serializers.dart form for all my files in the lib folder, yet, it was still complaining about that weird error "type '_$Article' is not a subtype of type 'Article' in type cast". I changed it to package:.... long form imports and everything works. Is that expected? I really liked (together with the dart autoformatter) organizing my imports kind of like in python, that first come dart imports, then package: imports, then my imports from lib folder.
Flutter is in Dart. But if you're familiar with something like JS or TypeScript (or any other object-oriented, and ideally also class-based language), you should be fine. I'm not sure if the Boring Show is good introductory content. Fortunately, there seem to be a lot introductory-level courses and tutorials for Flutter all over RUclips (and elsewhere).
Yes, i'm developer on JS (front with Angular) i take a course on Udemy www.udemy.com/flutter-dart-the-complete-flutter-app-development-course/ thank' s sir for ask me.
If you are used to use gson or moshi every day for de/serialization, the dart/flutter way feels like pain in the a@&. It took you at least about 30min to define one single data class and I think you didn't do this for the first time. I like this show but this episode was more a monologue than a show. :(
A WebView widget is planned, but - unfortunately - I don't think it's coming very soon. It's obviously something we want to have in the future. For showing full websites, the only option right now is to use something like url_launcher or write a hook in the underlying app (like, having the underlying Android app create a new Activity with a WebView on request). If what you seek is displaying rich text, there's the RichText widget. (In many apps, WebView is basically used just for displaying a little bit of text w/ formatting. You can even use pub.dartlang.org/packages/flutter_markdown if needed.)
Flutter currently doesn't have a webview widget - that's obviously something we want to have in the future. For showing full websites, the only option right now is to use something like url_launcher or write a hook in the underlying app (like, having the underlying Android app create a new Activity with a WebView on request). If what you seek is displaying rich text, there's the RichText widget. (In many apps, WebView is basically used just for displaying a little bit of text w/ formatting. You can even use pub.dartlang.org/packages/flutter_markdown if needed.)
Many engineers around campus use Thinkpads running Linux, but those of us that do mobile tend toward MacBooks so we can build iOS apps. I imagine a lot of people at Apple use Google Search, so it's not that weird. :)
45:58, guys, if I am to review your code, I would raise some serious red flags on this unit test. Firstly, line 29, you would mean `storyRes.statusCode == 200` (not rest.status code, it's the copy-paste evil!) Secondly, why nested if's? I bet most code smells analyzers will crazily scream out and kindly ask you to reverse the conditional check and use early return. Thirdly, if's in unit test is a big no. Maybe you want this test to pass even if network is broken, in which case we should have clear WARNING logs. Otherwise, `expect(res.StatusCode, 200); expect(idList.isNotEmpty, true); expect(storyRes.StatusCode, 200);`
Thank you so much for covering built_value, I had been trying to implement it in my project but I have been hitting the wall and getting this weird error which I am not able to make sense of, I have posted this question on stackoverflow, I will really appreciate if you could look into it and suggest where I am going wrong. stackoverflow.com/questions/51372133/dart-built-value-builtlist-error-in-serializer-arguments-of-a-constant-creati
Honestly, this show was promising at the pilot but then descended to this, I'm dropping out. Seriously, you're building the app and 2nd and 3rd part is about testing?
Flutter Tip at 34:15 - If you make changes to a const or final variable than while hot reload only const changes will reflect because its a stateful hot reload which maintain the state of the object having the final state.
Looking forwards to this small tips.
press Shift+End to select the whole line!
Love the show, it's (somehow) entertaining to see how you tackle these problems!
on line 29 of the test res should be storyRes. Great video. I though i have to write more code for making http requests
Andrew, you really need to learn some IntelliJ IDEA shortucts.... If you used a multi-line caret you would have edited all those field, from the API, in no time.
Just multi-line caret... Then press "home", then cmd+arrow right (at least in windows)... Then cmd+shift+arrow right.. Then delete, and you have all the fields....then "home".... Then type "String get"... Then "end" and ";" and you are almost done, just need to change some Strings for int and etc.
Oh... Where is Philip?! It's literally boring if you all have perfect accents guys :(
This episode was not up to the mark of previous two episodes. You were discussing among yourselves instead of telling us what you actually did.
The http response code ('res') is inspected twice, the second check should be 'storyRes'. And could you elaborate if all the HTTP calls would fail, the test would still succeed or not? Great show btw! I learn a lot... (not only flutter/dart)
Not boring at all, in my opinion. Love this live coding thing!!!!
please create a lesson in SQLite or animation or permission and thanks a lot for this show
This is totally on our list. Roughly in that order, too. Next episode won't be it, but soon.
@istanbul There are good Udemy courses for getting started with Flutter, but none of them compare to The Boring Show if you know basics of Flutter.
Shouldn't be in test "expect(res.statusCode, 200)" better option over "if (res.statusCode == 200)"?
Yes, it would be better, as with the if version the tests don't fail.
Looking forward for a tutorial on State Management. Almost all apps get new state from web, subscribe to state change, update state back to web. If will be great if you can give an idea on best practices to achieve these tasks.
Alt+Shift+Down Arrow in VSCode is one of my favourite shortcuts...
A suggestion: When trying to do the import stuff, take advantage of the dart_language_server to speed things up.
I couldn't find one thing in future builder is that, how do I change a single card's text on button click in the same card. All the cards are inside list which is being created using Json data from inside future builder, Now I have used setState() but it's refreshing whole future builder and refetching data from the server. Any ideas?
I am creating an e-commerce like app where user can increase or decrease the quantity from each service. All the services are being fetched using FutureBuilder, Now I can't make the increment and decrement counter make work with increasing text on each cards.
Can you show a little of the code so I can see exactly what you mean? You could point me toward something like a GitHub gist, for example.
gist.github.com/50shashwat/e2ea92c2f376e25c09e0bddbd8163a96 on line 274 I am using setState(){} to update the next container on line 332. I want to update the text of card using a button where the text and button both are in List build using FutureBuilder .
In my point of view Andrew and Filip are the best pair
The course is very good. Now you have a serialized tool, not a command line. I look forward to your reply. Thanks!
I am new to Dart and Flutter, but in Java, you could use RxJava2 flatMap() to take the ID and return a Future for each Article.
It's nice these video's obviously don't have any ads.
intense debugging and silence at 23:05 , lol. So much for parsing json into a dart object :)
Love the show thanks for putting this together! Out of curiosity, when Andrew got rid of all the `new` keywords; what did he use to select those?
So handy. It's called "Select Next Occurrence." IntelliJ (and therefore Android Studio) has offered it for a while: blog.jetbrains.com/idea/2014/03/intellij-idea-13-1-rc-introduces-sublime-text-style-multiple-selections/
If your using VS Code, I think its cmd + D (for each occurrence) and cmd + shift + L (for all occurrence).
Can the async snapshot be null? If so, would a ternary operation be useful to filter it?
-Your code is perfect!
-Because it's being _reviewed_!
38:45
So true :)
Shouldn't change the expected value in order for the test to pass? For the story 18812875 the by valur is "docbrown".
Thank you guys for the great show! 👍
I currently have an Socket.io server working with a web site, and I would like to develop an app with flutter that can stream the server content, I've found that this communication with Flutter and Socket.io is not possible right now, my question is wich websockets server could I use in oder to have this desired communication?
Is Flutter ever planning on having built it in better support for Tablets/Chromebooks
What, in particular, are you missing? Flutter runs well on these devices but I know there are things that need more love. I wonder what you consider the most important issues.
Filip Hráček It runs well, yes, but I would be interested to see layouts designed to easily switch to multiple panels, like how an email client would look. For example, Gmail on mobile has the list of emails which can be opened up to show the email, but on a Chromebook/Tablet it expands out to two different panels
chromebooks os will be replaced with fuchia , where flutter is gonna be the official way to develop fuchia apps
IntelliJ has a multiline cursor... would save you a lot of time
This is a great show. I start learning dart and flutter to develop app for android.
But I can not find information about @nullable annotation. Is @nullable is standard annotation and if so where is information about it?
I am sorry. I found nullable annotation in API documentation for built_value.
Hi, my parseArticle() works well under `Test` but it does not work in the App.
I get an error while performing this
`serializers.deserializeWith(Article.serializer, parsed);`
Error: type '_$Article' is not a subtype of type 'Article' in type cast
Can you help me out.
Again, It works perfectly fine under `Test`
Is it possible for you guys to make a library like Retrofit for Android to simplify the whole Network connection process?
I'm only 21 mins in so this comment may be premature but the set up for the built value stuff with going back and forth copying/pasting (seemingly) random lines of code into your Article class is super confusing. The on-the-fly coding in this series is great, but without some overall discussion about exactly what and why you're doing what you're doing it's not very coherent.
Am I supposed to remember what random github issue you went to to grab the lines of code for the plugin, and serializer, etc?
I didn't really understood the advantages of using built_value instead of other, simpler, solutions like json_serializer, i'm not familiarized with the "built value" concept at all and I don't see exactly how could it improve the quality of the code or the code perfomance or even the coding speed at all. For the moment I'll be going with json_serializer but will keep an eye in the build_value thing just in case I see a real advantage of using it.
If you're just looking for serialization, json_serializable is perfect. The built_value package is really meant to make immutable objects that behave like value types, and it gets serialization almost as a side effect. There are advantages and disadvantages of using immutable data models, some of which you can see here: www.quora.com/What-are-the-advantages-and-disadvantages-of-immutable-data-structures
Thank you for this video but can you tell me how can I reduce the app size build in flutter
It was a good episode. I would like to Know if serializations with build_value could manage complex json structure, I mean a List inside a map o viceversa, 2 level of list. To be more precise I using Drupal 8 as backend, in this APIs for nodes or user has more complex JSON structure
Yes, you can use built_value with nested object structures (e.g. one object has a list of another, or something like that). You can check out our json sample for some example code: github.com/flutter/samples.
Thank you for the support and examples. I will study it :)
I'm here to learn something. Great video as always 😀
Why won't you include the State management tutorial in the documentation? We always read the documentation in the official website. thanks!
Request: Emily Fortuna to be in the next episode of the boring flutter development sometime. She really loves memes. just to spice it up 🤣
Emily is definitely coming to a future episode. Great tip!
Glad to know!
Close the calendar notification PLEASE!
What is the difference between
import 'package:boring_show_example/src/serializers.dart';
and
import 'serializers.dart';
???
Because I had a nasty problem where my json wouldn't parse, and it was because of this import!
It was throwing "type '_$Article' is not a subtype of type 'Article' in type cast" no matter what...
I was following what you were doing, and had the same folder structure. Everything was the same except for this import.
Couldn't figure out what was wrong until I found your code in github and started comparing it line by line with mine.
Either one is fine; the important thing is not to mix them. Dart considers those two imports to be declaring two different namespaces (even though they ultimately point to the same file), and will create two different sets of class definitions for them. The team is considering a change to the system that'll detect and fix this, but in the meantime I recommend just standardizing on one approach (I always use `package:`, myself).
Thank you so much for the fix! I've been struggling with the same issue for a few hours now! :D
@@andrewbrogdon558 I was using everywhere the import serializers.dart form for all my files in the lib folder, yet, it was still complaining about that weird error "type '_$Article' is not a subtype of type 'Article' in type cast". I changed it to package:.... long form imports and everything works. Is that expected? I really liked (together with the dart autoformatter) organizing my imports kind of like in python, that first come dart imports, then package: imports, then my imports from lib folder.
Hi and thank's for it, i have one questions, pre- requerimient for learn this? i mean need some lenguaje (js, typescript)?
Flutter is in Dart. But if you're familiar with something like JS or TypeScript (or any other object-oriented, and ideally also class-based language), you should be fine. I'm not sure if the Boring Show is good introductory content. Fortunately, there seem to be a lot introductory-level courses and tutorials for Flutter all over RUclips (and elsewhere).
Yes, i'm developer on JS (front with Angular) i take a course on Udemy www.udemy.com/flutter-dart-the-complete-flutter-app-development-course/ thank' s sir for ask me.
How Can I Fetch the data from two separate api's and pass it to a stateful widget
these are really fun, even though I prefer faster pace in learning.
dear andrew, how can set a proxy to flutter http method? i come from china,i need proxy to get hacker-news...thanks
Love the kindness :))
thanks alot
If you are used to use gson or moshi every day for de/serialization, the dart/flutter way feels like pain in the a@&. It took you at least about 30min to define one single data class and I think you didn't do this for the first time. I like this show but this episode was more a monologue than a show. :(
Is copying and pasting those properties and removing the excess characters/words faster than typing them? =)
what esp did they use moor?
What is the app of that icon like the letter C?
Thanks
This built value seems like too much magic. I wonder if it would be better to parse that by simpler traditional code.
My flutter default app size is 90.40 MB. why ?
Andrew, ALT+Enter than "Import Class"
How do I parse json arrays?
Ex: [{},{}]
30:56 , (limited) reflection in flutter is now available via github.com/dart-lang/reflectable
what is the current state of webview?
A WebView widget is planned, but - unfortunately - I don't think it's coming very soon. It's obviously something we want to have in the future. For showing full websites, the only option right now is to use something like url_launcher or write a hook in the underlying app (like, having the underlying Android app create a new Activity with a WebView on request).
If what you seek is displaying rich text, there's the RichText widget. (In many apps, WebView is basically used just for displaying a little bit of text w/ formatting. You can even use pub.dartlang.org/packages/flutter_markdown if needed.)
56:00 future builder
❤️ Flutter
#BoringShow How can we open these links in a webview ?
Flutter currently doesn't have a webview widget - that's obviously something we want to have in the future. For showing full websites, the only option right now is to use something like url_launcher or write a hook in the underlying app (like, having the underlying Android app create a new Activity with a WebView on request).
If what you seek is displaying rich text, there's the RichText widget. (In many apps, WebView is basically used just for displaying a little bit of text w/ formatting. You can even use pub.dartlang.org/packages/flutter_markdown if needed.)
Thanks
storyRes.statusCode not res.statusCode
Shift+Cmd+left
man, this seems like an awful lot of code compared to something like Retrofit.
So is google using MacBooks now?
Simon Deelstra They always have
Many engineers around campus use Thinkpads running Linux, but those of us that do mobile tend toward MacBooks so we can build iOS apps. I imagine a lot of people at Apple use Google Search, so it's not that weird. :)
That's a great answer you just gave!
\o/
Andrew Brogdon which mac model do they usually use?
speak louder please. nice show guys
45:58, guys, if I am to review your code, I would raise some serious red flags on this unit test.
Firstly, line 29, you would mean `storyRes.statusCode == 200` (not rest.status code, it's the copy-paste evil!)
Secondly, why nested if's? I bet most code smells analyzers will crazily scream out and kindly ask you to reverse the conditional check and use early return.
Thirdly, if's in unit test is a big no. Maybe you want this test to pass even if network is broken, in which case we should have clear WARNING logs. Otherwise, `expect(res.StatusCode, 200); expect(idList.isNotEmpty, true); expect(storyRes.StatusCode, 200);`
Thank you so much for covering built_value, I had been trying to implement it in my project but I have been hitting the wall and getting this weird error which I am not able to make sense of, I have posted this question on stackoverflow, I will really appreciate if you could look into it and suggest where I am going wrong.
stackoverflow.com/questions/51372133/dart-built-value-builtlist-error-in-serializer-arguments-of-a-constant-creati
Do checkout "Built Value Tutorial for Dart & Flutter" by Reso Coder and thank me later.
Speak LOUDER
Honestly, this show was promising at the pilot but then descended to this, I'm dropping out. Seriously, you're building the app and 2nd and 3rd part is about testing?
Bro I don't understand what r u doing?
+1 gson is much better than this, to much boilerplate to start coding
this episode was a waste of time