Widget Tricks Newsletter #18
Creating your own Macro. Flutter tips. Analyzing network requests. Contributing to Flutter. E2E testing using Maestro. Freelancing or Job? Life After Death PowerPoint Presentation, and much more.
📝Post of the month:
💡Flutter Tips:
1. How to show a dialog after the page is loaded ? Use afterLayout mixin
2. How to add debounce in Riverpod provider
3. Day 8: Dismiss item with a Swipe
✍🏻 Articles to read:
Everything You Always Wanted to Know About HttpClients by Thomas Burkhart
I love deep dive investigation blogs on specific issues. This blog focuses on network request time with http client in dart.
Why does having multiple instances of HttpClient make network requests slow? How and which tools should be used to analyze network requests? I learned a lot about the internals of how http it works in Dart.
How to Build Anything Extremely Quickly by dnbt777
I believe developing writing skills is essential for acquiring any skill. Whether it be coding, product management, teaching, creating videos, etc. Most people are afraid of the blank page and get stuck at the initial phase of writing.
This blog explains how to briefly outline first and than fill in gaps later and how to avoid striving for perfection in the beginning.
How code push works by Shorebird
Last week, I was researching shorebirds and came across this article on how shoebird works internally.
To simplify, based on my understanding, there are two types of code: compiled code and interpreted code.
Shorebird figures out which part of the code has changed and decides whether to run compiled code or interpreted code based on the patch. This blog provides more details on the Dart language inner workings, which might be overwhelming to some developers. 😃
📺 Videos to Watch:
To contribute to Flutter start with THIS | Building Flutter
The first step is always difficult. After that, things become easy. This applies to contributing to the Flutter framework as well.
Setting up your local environment for the contribution is tricky. You need to keep the Flutter version of the current project you are working on and also the version you are making contributions to. Also, make sure the bug you fix uses the Flutter version you made changes to. All of these things on how to set up your local environment are nicely covered in this video.
Maestro Magic: Creating UI Tests with Effortless Ease for Developers with Nishant Srivastava
In my current project, we were experiencing a lot of breaking changes in the REST API. Although we have tests, most of them mock the network response, so we cannot catch errors until they go to production.
Therefore, we decided to implement end-to-end testing for our Flutter app. After some research, we decided to give Maestro a try. It has been a long time since I saw a tool that is very simple to set up. All you need is a YAML file and steps.
One thing I like about these tests is that they are written in the form of user stories, rather than technical details. They do not require knowledge of your framework, such as Espresso in Android and integration_test in Flutter.
Let me know in the comments if you are interested in a tutorial video on this for Flutter.
Is Freelancing Better Than Full-time? | De-influencing
Everyone wants to do freelancing because it seems lucrative, luxurious and free from a 9-5 job. But it's not. The grass always looks greener on the other side. This video debunks that exact myth.
🪶Quotes
📦Code/Pub Packages/Plugins:
Talker
Advanced error handler and logger for dart and flutter apps
❓Questions I liked
How do you keep up with the ever-changing tech stack?
Like other people have said, I don't keep up. Let tech change in the background while you just work on your current projects. When you start something new, take a glance around and see if anything new looks promising, and if so, learn it. Otherwise, just keep doing what you know.
Is it possible to make FAANG salaries without working there?
If you aren't a shoo-in at FAANG and you want to make that kind of money, your best bet is to learn how to start and run a business. I don't mean try to launch a billion dollar social app that needs venture funding. I mean a SAAS that solves a boring problem for other businesses with money to spend.
Am I crazy or is Android development awful?
TL;DR - what I can do in 10 minutes on a desktop python app (windows or Linux, both worked fine) seems near impossible as an Android app.
🐤Posts I like:
😂Fun and Memes
Life After Death by Powerpoint (Corporate Comedy Video)
How to Buy a MacBook 🤣
👋🏻 That’s it, Folks
If you are a Flutter developer who wants to advance your Flutter skills, then I am currently running live classes called effectiveflutterdev.com. So if you are interested, then apply now.
Also, If you enjoyed this post, then would you be able to do me a quick favor and share my latest blog post with your friends and colleagues? I'd really appreciate it and I think it could be valuable to them.