<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Max Weber on Medium]]></title>
        <description><![CDATA[Stories by Max Weber on Medium]]></description>
        <link>https://medium.com/@myracledesign?source=rss-9f49bfc60bf8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*zV_pXi9kHjRR_zBjNtQPEw.jpeg</url>
            <title>Stories by Max Weber on Medium</title>
            <link>https://medium.com/@myracledesign?source=rss-9f49bfc60bf8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 21:57:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@myracledesign/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Deployment of a Dart Server on Heroku]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@myracledesign/deployment-of-a-dart-server-on-heroku-c246e8a9367d?source=rss-9f49bfc60bf8------2"><img src="https://cdn-images-1.medium.com/max/960/0*jwubxlcxmCUtvipU.png" width="960"></a></p><p class="medium-feed-snippet">Running the first server is a fantastic experience for every developer. It gives you many options and possibilities and improves your&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@myracledesign/deployment-of-a-dart-server-on-heroku-c246e8a9367d?source=rss-9f49bfc60bf8------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@myracledesign/deployment-of-a-dart-server-on-heroku-c246e8a9367d?source=rss-9f49bfc60bf8------2</link>
            <guid isPermaLink="false">https://medium.com/p/c246e8a9367d</guid>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Max Weber]]></dc:creator>
            <pubDate>Sat, 09 Apr 2022 17:34:23 GMT</pubDate>
            <atom:updated>2022-04-09T17:34:23.554Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Code Analysis & Linting in Flutter and Dart — Flutter Explained]]></title>
            <link>https://medium.com/flutter-community/code-analysis-linting-in-flutter-and-dart-flutter-explained-3014a481e5e?source=rss-9f49bfc60bf8------2</link>
            <guid isPermaLink="false">https://medium.com/p/3014a481e5e</guid>
            <category><![CDATA[static-code-analysis]]></category>
            <category><![CDATA[linting]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[dart]]></category>
            <dc:creator><![CDATA[Max Weber]]></dc:creator>
            <pubDate>Mon, 04 Jan 2021 15:27:29 GMT</pubDate>
            <atom:updated>2021-01-19T09:02:19.501Z</atom:updated>
            <content:encoded><![CDATA[<h3>Code Analysis &amp; Linting in Flutter and Dart</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yDcxEjYNE_ZLKCPN.png" /></figure><p>One of the best practices that we introduced in the video <a href="https://www.youtube.com/watch?v=bn5e95b3uLY">best practices for Flutter</a> is Flutter Code Analysis and Linting. I would like to start a small series of different Blog posts where we talk about each of these Best Practices and today we start with the very first one: Code Analysis and Linting.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FTBgWVqafJW4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DTBgWVqafJW4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FTBgWVqafJW4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e854c0ed58c9383f568edc4f88853c6a/href">https://medium.com/media/e854c0ed58c9383f568edc4f88853c6a/href</a></iframe><h3>Setup Code Linting for a Flutter project</h3><p>In the beginning, let me say that additional Linting in Flutter is a controversial topic. On one side, many love code linting, because it allows us to focus on crucial parts of our code. However, some people are not fond of it because it restricts them and leads to false build errors. But before we start the discussion, let us begin with what code linting is and how we can use its full potential.</p><p>Code Linting is an automated verification that your code is correct. There is always a Linter that we all use in our day to day work. In editors like VSCode and Android Studio, we receive errors when our code is not runnable. The visualisation of build errors are already features of our Linter. This integrated Code Linter is a tool that checks your code for build problems, that means you would not even be possible to run your application. We do not have to search for errors in our code, and when everything is green, we are sure that our code is executable.</p><p>Thanks to modern tools, we can extend these rules and check our current project for more than just broken code. For example, we can tell our Linter that we want to check for wrong code styling. In Dart and Flutter the additional lint rules are managed by a file called analysis_options.yaml. If you have never heard about a yaml file extension, it is just a convenient way to structure a file that allows you to create tree structures with two spaces. Feel free to read more about the .yaml file extension <a href="https://yaml.org/">here</a>.</p><h3>Our Mission: Enforce single quotes in our project</h3><p>Let us assume we would force all our developers to work on our project, that every string should be done with a single quote. Our IDE should show it immediately, like in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4F--n-p6ALOha6jflnhAjg.png" /><figcaption>Example of our Result</figcaption></figure><p>To achieve that the static code analyzer of Dart and Flutter recognize that mistake, we must create an analysis_options.yaml responsible for our whole project gives our Dart analyzer instructions that run in the background and verifies our code. We can create the analysis_options in the root of our project, and most IDE’s like Android Studio or Visual Studio Code will right away understand what it needs to do with it. Now, let’s take a closer look into the analysis_options file. Inside of the analysis_options, we can modify the behaviour of the analyzer and the linter.</p><h3>The Analyzer &amp; Linter</h3><p>In our first section in the common analysis_options.yaml file is usually the analyzer. Here we can configure a more general part of how we want to check our code. Firstly, we can set up if we want to show errors, warnings, or as information for specific rules. Secondly, we can exclude files and folders from the checking system. Moreover, we can <a href="https://dart.dev/guides/language/analysis-options#ignoring-rules">ignore specific rules</a>. Last but not least, we have the chance to introduce additional <a href="https://dart.dev/guides/language/analysis-options#enabling-additional-type-checks">strict type checking</a> and <a href="https://dart.dev/tools/experiment-flags#using-experiment-flags-with-the-dart-analyzer-command-line-and-ide">experimental behaviour</a> like no slow checks or super-mixins.</p><p>To use now the main information that we registered to the Analyzer, we have to specify the rules that we want to apply in our project. Therefore, we use the Linter section of the analysis_options.yaml. In the linter section, we define which rules are applied to our project. There are around 180 rules that you can specify and make them right away visible in your application. To explain, all of them would bust this blog post, so feel free to look at the list of linting rules you can specify at the <a href="https://dart-lang.github.io/linter/lints/">Linter for Dart site</a>.</p><h3>Linting Rules</h3><p>At the time I write this post, there are three different categories of Linting Rules. The first is the Error Rules, and they are possible coding errors. Secondly, we have the Style Rules that define code style matters, like a single quote or double quote. It does not hint whether your code is stable or not, but it helps align the whole codebase. The pub rules follow both. This set of rules defines how a pub package has to behave; it includes only two rules on how to name a package and sort dependencies in your pubspec.yaml.</p><h3><a href="https://dart-lang.github.io/linter/lints/avoid_init_to_null.html">avoid_init_to_null</a></h3><p>As the name already states with this linter rule, you do not allow anymore to initialize a variable with null. But why could this be helpful? In Dart, every variable that is not specified with a value is automatically set to null. There is no concept of empty memory or any other trap that we could fall into. With that in mind, a specific declaration of a variable to null would only bloat our code and is unnecessary and unneeded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*qsdto7Z88qCbbP5c0247xw.png" /><figcaption>On explicit null decleration the linter is showing a message</figcaption></figure><h3><a href="https://dart-lang.github.io/linter/lints/use_string_buffers.html">use_string_buffers</a></h3><p>Another fantastic rule that many developers are not really aware of is a more performant way to concatenate strings. The String Buffer helps you improve the concatenation of Strings and allows you to do it in the most performant way. To make sure that all contributors in your code concatenate strings efficiently, we can set the <a href="https://dart-lang.github.io/linter/lints/use_string_buffers.html">use_string_buffers</a> style rule.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4dtQqqEt8CRXf2Lt.png" /><figcaption>Linter shows a warning if you could use a StringBuffer</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/0*6laLmwlSbF5dZCZZ.png" /><figcaption>StringBuffer provides a performant way to handle Strings</figcaption></figure><h3><a href="https://dart-lang.github.io/linter/lints/prefer_double_quotes.html">prefer_double_quotes</a></h3><p>The prefer double quotes rule allows you to take control if you want to enforce a specific quote style. Here we prefer in our code base double quotes but also the single quote rule exists and makes it possible to enforce quote style. This is especially helpful if you work in a multilanguage team because Keyboard layouts differ from country to country. In contrast, in English and American speaking country, the single quote is easier accessible and mostly used in other countries like Germany, the double quote is usually prefered. This rule leads to clear information on how the maintainer or the owner of a package or project wants to work in general.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L8kzPgTXd5EzKytG.png" /><figcaption>The prefer double quotes Rule lead to informations about usage of a double quote</figcaption></figure><p>This is also the rule that we will use to finally solve our problem and enforce double quotes for the whole project.</p><h3>The Solution</h3><p>Alright now that we know how the Linter and the Analyzer work lets solve our goal for this blog post, we want to enforce every developer who works on our codebase to prefer double quotes, and if they do not, we want to really show it as an error. The first thing we have to do is to define the Analyzer with the correct severity of the issue. In our case, this would be “error”. Next, we just defined in the pubspec.yaml our linter with the new rule that we want to add.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/0*RHyKLartvgLDJmUf.png" /><figcaption>Analyzer &amp; Linter</figcaption></figure><p>Now after we have specified the rule and the severity of the enforcement we can already see in our IDE the errors appearing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/0*uVcn-CJcBhho1qms.png" /><figcaption>Linting error appear after setting the right rules</figcaption></figure><p>If we now run <strong>dart analyze </strong>in our terminal inside our project, we receive a full analyzing report. Now we can use this command inside our terminal. If we use this command now in our <a href="https://flutter-explained.dev/blog/github-actions-for-flutter/">CI / CD</a> chain, the build will fail, and our team would have to fix it to merge it in our project.</p><h3>Lint Rules as a package</h3><p>As always, there are fantastic packages that come with a predefined selection of rules that makes it easier to set up the first baseline that you want to use in your project. Let us first have a look at how we can include them in our project.</p><h3>Install a third party linting rule set</h3><p>In order to add a linting rule set we have to first add the dependency to the pub.dev package in our pubspec.yaml. As an example we want to add the Lint package to our project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/0*YPP8BtxwsT-wUQ83.png" /><figcaption>Adding lint into our dev dependencies</figcaption></figure><p>The next step is to import the rules from the package into our analysis_options.yaml.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eGQ5HCs88zZ0cYJW.png" /><figcaption>Added the analysis_options of the lint package to our analysis_options of the project</figcaption></figure><p>As soon as you open now the different files, you will now recognize that the package’s linting rules are already taken into account and are ready to use. Let us assume that you do not like a rule. You can easily overwrite the behaviour by including the linter and analyzer. Your rules will overwrite the package’s rules, with that you will always have control over the linting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*l5k-MmNcbGIQJtfz.png" /><figcaption>Full solution with overwrite of specific rules</figcaption></figure><h3>Lint Package</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*uNNx7hBlZhY7Pql5.png" /><figcaption>Logo of the Lint Package</figcaption></figure><p><a href="https://pascalwelsch.com/">Pascal Welsch</a> creates the first Lint package, and it includes a baseline of lint rules for Flutter and Dart Projects. You can extend or exclude rules afterwards if you use this package, but it is created with consumers. That means if you are not necessarily working on the Flutter project. This should be your way to go.</p><h3>Pedantic</h3><p>The second package that I want to introduce you is the so-called pedantic package. The Flutter team created the pedantic package to support a set of rules that is usually way more restrictive in terms of usage and allowances and is a bit over-engineered from time to time.</p><h3>Conclusion</h3><p>In this post, we learned how to use the Linting Rules to our advantage and enforce rules so that every developer who collaborates with us works in the same way. To generate these rules and discuss them in a team could be tedious, and many people would say that it is not worth the effort. But if the conversation and discussion start now, you have the right tools to join the discussion and give some valuable insights.</p><p>Thank you for reading and let me know what you are thinking about Linting rules down in the description below!</p><p><em>Originally published at </em><a href="https://flutter-explained.dev/blog/flutter-analysis-linting/"><em>https://flutter-explained.dev</em></a><em> on January 4, 2021.</em></p><p>Follow Flutter Community on Twitter: <a href="https://www.twitter.com/FlutterComm">https://www.twitter.com/FlutterComm</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3014a481e5e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/flutter-community/code-analysis-linting-in-flutter-and-dart-flutter-explained-3014a481e5e">Code Analysis &amp; Linting in Flutter and Dart — Flutter Explained</a> was originally published in <a href="https://medium.com/flutter-community">Flutter Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Our YouTube Channel: Flutter Explained — The first six months]]></title>
            <link>https://medium.com/@myracledesign/our-youtube-channel-flutter-explained-the-first-six-months-240799b7bccb?source=rss-9f49bfc60bf8------2</link>
            <guid isPermaLink="false">https://medium.com/p/240799b7bccb</guid>
            <category><![CDATA[youtube]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[youtube-creators]]></category>
            <dc:creator><![CDATA[Max Weber]]></dc:creator>
            <pubDate>Fri, 31 Jul 2020 11:07:23 GMT</pubDate>
            <atom:updated>2020-07-31T11:07:43.015Z</atom:updated>
            <content:encoded><![CDATA[<h3>Our YouTube Channel: Flutter Explained —The first six months</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k3qzOBqaRlXcfKO5VAYyPw.jpeg" /></figure><p>This year was a year of personal “first times”. Me and my fience returned last year in december from our world travel and decided that it is time to change our lives. We wanted to create a company and do something <em>different</em> then before the travel.</p><p>We started a company with my fiancé in the hope to develop the next big world travel app solution. When we started with the development I joined Twitter because I heard there is a big Flutter community. In this time I read some twitter feeds about a guy called <a href="https://twitter.com/florinpop1705">Florin Pop</a>. He is a Content Creator on Twitter with motivational and JavaScript developer posts. He started a challenge, 30days30videos and released every day a small video about the topic he loved.</p><p>This was a fantastic way to start a YouTube channel was my thinking, and I had my old “gaming” channel that I wanted always to grow. I loved to make content on YouTube but the success is at the beginning very small and you do not earn any reward. Anyhow, I was hooked by the idea, 30 days, 30 videos. I started, every day a new video that brings value to my viewers. Mahtab, my partner was very mixed up with her feelings about this. On one hand she supported me from all her heart and gave me the power when I was about to give up, on the other hand she wanted to finish the development of our app and tried to pushed me to bring value to the app.</p><p>Then Corona came, and our travel app idea has been fallen apart, no more world travellers that could be interested in our app.The YouTube channel sounded like a great possibility for our young company to bring value to everyone and earn maybe something with it. So let me explain you what we did to raise our non existend channel to a more then 1800 people channel.</p><h3>First Milestone: 1000 Subscriber</h3><p>As every small YouTube, we had just one goal one thousand subscribers as fast as possible. After one month where I released every day a video, we reached 311+ Subscriber and that was a fantastic number. If 300 people follow you somehow your work gets important. My first long term Community members joined in and supported me that I should not give up and keep going.</p><p>The biggest challange during this time was to ignore the numbers, sometimes instead of working on new videos I was watching how the numbers develop on the channel. Statistics have a weird fascination on a young YouTube creator. Espacially because they do not really help you in the beginning because the channel is anyhow small and you do not have numbers to compare them to, everything is an increase from 0 :).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*0u6Ci3Qel8CNzXO7rkPk4Q.png" /><figcaption>Our first month of YouTube statistics</figcaption></figure><p>But after one-month everyday video, I was completely exhausted, the pressure to create content and try to make it as good as possible was crazy much to do. Additionally, there was tons and tons of stuff to learn.</p><ul><li>How to optimize your channel?</li><li>What wants my audience?</li><li>Who is my audience?</li><li>How Should I do my Thumbnails?</li><li>Should I partner up with other channels?</li><li>How to cut better?</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ArFJZvDZNhMmiwqxs-OiBA.png" /><figcaption>Our first Thumbnail</figcaption></figure><p>After that month, I decided that I should slow down my channel instead of every day there was now every week a video. Obviously that was not good on my performance, all numbers went down. And if you are a ambitious guy like it really hurts you to see the numbers declining. But Mahtab and I decided to let it run as is for the next four weeks so we can prepare for our first “<em>relaunch</em>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*XNVJOxHJU3DvzubmIQpm6Q.png" /><figcaption>Second Month on YouTube</figcaption></figure><h3>Relaunch of the channel</h3><p>This was a great idea and it helped a lot, the next four weeks we had just one video each week and I concentrated in the time to improve my content, learning new cutting techniques read a lot more about video and content management. I made even some certifications on the YouTube creator acedemy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y-uYikE9ePrGQGO1OP127A.png" /><figcaption>Redesign of our YouTube Channel</figcaption></figure><p>We recreated the channel added a new Thumbnail template, created a Channel header and made myself a promise to increase again to two videos a week, but instead of keeping the rest of the week empty I wanted to start also with Live streaming, then slowly I recognized that 1000 Subscriber is just the first step.</p><p>In this time I convinced my partner to join the channel, and help me with one video a week so that we can share the workload and improve together. She helps me with a perfect project planning and since she joined I have the feeling the channel improves constantly.</p><p>In May it happend, after more then 50 videos we managed it to achieve our Milestone, 1k Subscribers. This means one thousand people who are watching our content on their favorite device. Looking for help and guidance trough Flutter and we are there for them. That was an incredible feeling and it is still today because I cannot imagine a crowd of 1000 people :).</p><p>So my advice for this stage is, really take a bit of time how you can improve, obviously content is key and to have more will help you grow faster but also make sure that your channel reflects you, be yourself. My goal was to be “professional” even if I was still a beginner / intermediate in Flutter development.</p><h3>Second Milestone: 4000 Hours Watch Time</h3><p>Our next Milestone that we want to reach is 4k hours of watch time. With this we are eligible to monetize our content on YouTube and we would receive the allowance to work with YouTube together in their partner program. But at the moment we are still far away from that number.</p><p>To increase the watch time we decided to increase our video arsenal with Live Streams and we invested some money to get Streamlabs Pro. That tool helped us to setup a <a href="https://flutterexplained.live/">website</a> where the community can work closer with us and in a more interactive way. Additionally the possibility to donate us some money have been given (<a href="https://www.youtube.com/watch?v=PXZKSrSJIvs">and even used</a>, thanks for your support :).</p><p>After all the changes and challenges we are heading now to nearly 2.000 Subscribers and having a Watch time of 1.600 h. I believe this a freaking incredible amount of people who like our content and share it with their friends and families and if they are getting even better with Flutter development it was worth the work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*HM-iI6mLinkAWihdV30Fjg.png" /></figure><p>According to a <a href="https://myworkfromhomemoney.com/how-long-1000-subscribers-youtube/">website source </a>somewhere in the internet it takes round about 22 months for a usual channel to reach 1 thousand subscribers, we did it in 4. Next step is 4.000 hours watch time and my current hope is to reach that goal within this year.</p><p>Now you know why this year was truly the year of first times. The first time we setup a company. The first time learning about YouTube from a business perspective and first time to have a community with more then thousand members. Thanks to every one who is following and supporting us.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=240799b7bccb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3. Problems we avoid with our CI / CD pipeline]]></title>
            <link>https://medium.com/@myracledesign/3-problems-we-avoid-with-our-ci-cd-pipeline-be36900635a3?source=rss-9f49bfc60bf8------2</link>
            <guid isPermaLink="false">https://medium.com/p/be36900635a3</guid>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Max Weber]]></dc:creator>
            <pubDate>Wed, 06 May 2020 14:18:03 GMT</pubDate>
            <atom:updated>2020-05-06T14:20:25.542Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z8EooYqRBVbzmuZWTB72FQ.jpeg" /></figure><p>In the first episode of our CI / CD blog, we worked with <a href="https://myracledesign.de/blog/github-actions-for-flutter/">GitHub Actions</a>. In our last project, we decided to work with the CI / CD solution Codemagic. We were delighted with the tool and could solve some issues in our codebase that happens to probably every development team.</p><p>This article is an addition to my video for CI/CD.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FkR0N_Ecv_b0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkR0N_Ecv_b0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FkR0N_Ecv_b0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e86dbf3b63935ff1907f74bf29685622/href">https://medium.com/media/e86dbf3b63935ff1907f74bf29685622/href</a></iframe><h3>Save Recipe App</h3><p>Whenever we want to try a new recipe in our home, we will search on the internet and select a random recipe for cooking or baking. But as soon as we had our dinner or the cake, we can not remember and find the recipe anymore. Therefore, my partner and I decided that the world is ready for a save recipe app where we can store screenshots of all the delicious recipes that we find on the internet.</p><p>The app is currently an MVP, but it has already most of the functionality that we want to deliver. This app will be today the example for our article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*FrEA2yD5r1gzRFXY.png" /></figure><p>We created already a Codemagic build pipeline for it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/0*eHPt-5byH8G1dka1.png" /></figure><p>We configured it that way that whenever we push on the master branch in GitHub, it starts the build and deployment process. Feel free to check out our repository and give the project a star on GitHub.</p><h3>CI / CD with Codemagic</h3><p>For those who never heard anything about Codemagic, I want to give a brief overview about the solution. Codemagic is a solution to create <strong>C</strong>ontinuous <strong>I</strong>ntegration (<strong>CI</strong>) and <strong>C</strong>ontinuous <strong>D</strong>elivery (<strong>CD</strong>) for mobile apps. It began as a pure Flutter CI / CD SaaS and is therefore strongly aligned with Flutter development. So if you or your company program in Flutter I can highly recommend you to take a look at it.</p><p>Thanks to a CI / CD like Codemagic, we can run our tests and deploy without doing anything additionally as pushing to the master branch furthermore, because the pipeline runs the Analyzer, Tests and releases immediately. That creates us a safety net which helps us to avoid some common issues that happen in every team from time to time. So we want to give you a glance at what could go wrong and how you can debug this problem.</p><h3>1. Compiler Error in our code</h3><p>Let us begin with a problem that very rarely occurs, but if it happens, it blocks a lot of team members and is usually extremely expensive. So we confine our code base with some compiler errors. We push the broken code to our branch on GitHub, and we merge it to the master branch. A new build will start to run, and a couple of minutes later, we will see the following message in our build overview.</p><blockquote><em>Test run failed: Flutter analyze found issues.</em></blockquote><p>The message states that the Flutter analyses did not pass, and our pipeline found issues. To receive more information, we open the testing tab and see in the results part which issues we have.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/0*aHpWb-38eFw_4oLy.png" /><figcaption>Flutter tests result with Analyzer problems</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/0*BgUgC_yKudwD0-JJ.png" /></figure><p>The Flutter analyser found the mistakes that we did and shows in the logs the problematic areas. I point this “basic” error out because it helps us to find issues and protect our application from defect code. Finally, our team can be sure that after the CI / CD pipeline runs, our team does not have to fear defect code and with that a code freeze.</p><h3>2. Broken Unit- or Integration tests</h3><p>The most natural and most widespread problem that we run into are broken unit or integration tests. When one of our tests failed, we could find the problem very easily by checking the testing part on the dashboard. The build logs are very expressive, and the result messages give us the right direction.</p><blockquote><em>Test run failed: Flutter test run failed. Test run failed: Flutter test run failed.</em></blockquote><p>Thanks to the dashboard, we must jump into the testing tab and see here the log and results in tabs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3gyfsjv09K9YrGfG.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/0*E0CVLqSFl46rsycY.png" /></figure><h3>3. Wrong app-specific password</h3><p>Hurray, our app is ready to get published to the App Store, we run into issues.</p><blockquote><em>Test run failed: Flutter test run failed. Test run failed: Flutter test run failed.</em></blockquote><p>To get more information about our error, we open the dashboard and open the publishing part.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/0*jAyI8mlMbF1kiaE2.png" /></figure><p>In the picture above you find the following errors</p><pre><em>Error: Unable to validate archive “/Users/builder/ipas/Save_Recipes.tpa<br>Error: code –22020 (Unable to validate your application. We are unable to create an authentications session.</em></pre><p>This error messages unfortunately still do not help us what exactly went wrong. So we needed the first time the <a href="https://docs.codemagic.io/troubleshooting/accessing-builder-machine-via-ssh/">SSH access</a> to get more details about this error. To do so, we must run the build manually and activate the “Enable Remote Access” in the specified build configuration window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/0*t85HGkGbJ4jP1mxC.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZoKjIvK9gKEGz0Td.png" /></figure><p>To connect to the build machine, we need to open our Terminal and paste the statement that we get on the top of the Codemagic dashboard for SSH access. After we connect to the build machine, we run in our terminal the last executed command, which you can find in the Publish area in blue.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/51a4871b0e8054a6248dfb7624c088fd/href">https://medium.com/media/51a4871b0e8054a6248dfb7624c088fd/href</a></iframe><p>The added verbose attribute helps us to get way more detailed information of the command and shows us additional error messages that we can use to figure out what went wrong.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/0*8U4wJ1XsseLQjpoq.png" /></figure><p>Here we get the error message that the app-specific password is wrong. To solve this, we need to create an app-specific password in the app store. This password provides a secure process for a third-party app to connect with Apple Store via our Apple ID. To create this password, you can follow the steps in the <a href="https://support.apple.com/en-us/HT204397">apple portal.</a></p><p>After we created our app-specific password, we head back to the configuration of our app in Codemagic. Here we have to update the app-specific password in the field iOS code signing. If you now start a new build, the problem is solved, and your build passes successfully.</p><p>The work with the SSH tool was mind-blowing. It helped us to identify the problems and solved them inside of our CI / CD tool. It showed us how vital SSH access to the running build system is if the UI cannot be expressive enough.</p><h3>Conclusion</h3><p>I hope that these solutions for our three expensive mistakes will help you in the future to avoid these problems within your build pipeline. Thanks to the integration with Codemagic, we managed to save time, increase our stability and prevent from expensive code freezes.</p><p>Please let us know in the comments below, which CI / CD tool you normally use for your projects and what problems you already solved with it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be36900635a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Step-by-Step guide for Flutter JSON Serialization]]></title>
            <link>https://itnext.io/step-by-step-guide-for-flutter-json-serialization-fd5acd5e7521?source=rss-9f49bfc60bf8------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd5acd5e7521</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[guides-and-tutorials]]></category>
            <category><![CDATA[json-serialization]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Max Weber]]></dc:creator>
            <pubDate>Tue, 07 Apr 2020 06:52:14 GMT</pubDate>
            <atom:updated>2020-04-07T15:54:26.273Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZWHnNns9PbnjQtKoAsArxw.jpeg" /></figure><p>I published some time ago a video tutorial on how we can <a href="https://www.youtube.com/watch?v=hz2LQ43muio&amp;t=7s">create a basic network request</a>. In this post, we want to take a look at how we can improve that solution with Flutter JSON Serialization. With that, we can remove a lot of Strings in our code base.</p><p>I also created a video for this article, so feel free to take a look.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FgYoQAA7rVVc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DgYoQAA7rVVc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FgYoQAA7rVVc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d5894c5b57232ccb2c084a49ee13ed7b/href">https://medium.com/media/d5894c5b57232ccb2c084a49ee13ed7b/href</a></iframe><h3>General Serialization</h3><p>Serialization is the process in computer science to convert an object into something that can be saved in a database or be sent via a network request. Today we want to transform a JSON String that we receive from an API and transform it into an instance of an object.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*cRujRuBevUWdOfprIDsF-w.png" /><figcaption>JSON to Instance</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*-Wz6fI3XyzwR-vplhV6Yqw.png" /><figcaption>JSON String to Person</figcaption></figure><p>To get our Person information as a String, I will work in the following example with the Random User Generator. This can generate random user information and provides us with an API to receive a JSON String.</p><h3>Basic Network Request — Example App</h3><p>With the help of the <a href="https://randomuser.me/">RandomUserAPI</a>, I created an application that shows us a list of users as soon as we open the app. We create this Application together in the video for a <a href="https://www.youtube.com/watch?v=hz2LQ43muio">basic network request</a>. In the video, we use the manual approach for Flutter JSON Serialization, and with this blog post, we changed that to a more automated process.</p><p>If you search the source code for this project and this article please you will find everything <a href="https://github.com/md-weber/network_request_tutorial">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*uog29sHlPyl_zWFhjMX5iw.gif" /><figcaption>User Scroll List in Flutter</figcaption></figure><h3>Manual Flutter JSON Serialization</h3><p>To get a better understanding of why we should prefer automatic Flutter JSON Serialization, we have to take a step backwards. For that, we first take a look at how the manual serialization works precisely.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/abaf14968f5c447a9dca969e00967cf0/href">https://medium.com/media/abaf14968f5c447a9dca969e00967cf0/href</a></iframe><p>In the code snippet above, we created a new person object that we receive from our API. As you probably already have seen, we have to write all the key strings into the class and pollute our class with API information. Additionally, we come into the trap that if we want to add or remove an attribute, we have to change it all over.</p><p>That makes the maintainability pretty hard. Especially if the API changes and we have to create it from scratch. That would lead to a lot of searches and replacements, and we will lose all IDE supports.</p><h3>Benefits</h3><ul><li>No boilerplate surrounding the solution</li><li>There is no setup required, so you can start directly accessing the parameters</li></ul><h3>Disadvantages</h3><ul><li>You have to write every line yourself</li><li>Typos can happen and reduce the stability of your application</li><li>For every new Field that you want to add, delete or modify we have to modify the code in the model</li><li>Higher maintenance costs especially for larger projects or with changing API´s</li></ul><h3>Generated Serialization</h3><p>Now that we understand the issues with self-written serialisation let’s have a look at generated Flutter JSON Serialization. There is at the moment not a built-in solution in the Flutter framework, but there are plenty of perfect packages on <a href="https://pub.dev/">pub.dev</a> for this problem. In this article, we will have a closer look at the <a href="https://pub.dev/packages/json_serializable">json_serializable </a>package.</p><p>The package works powerfully with the build_runner package and allows us to generate the “fromJSON” and “toJSON” functions, without writing all keys of the JSON. We only have to set up our models correctly, annotate them accurately and provide two functions inside. But enough of the words, we want to see some code.</p><h3>Dependencies</h3><p>Before we can begin to work with the json_serializable package, we have to add first some dependencies into our project.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fc8a809c4e70682759af957840c015ad/href">https://medium.com/media/fc8a809c4e70682759af957840c015ad/href</a></iframe><p>The json_annotation is the only dependency that actually has to be inside of our project. The build_runner and json_serializable are just development dependencies and will not be part of the final bundle.</p><h3>Modify the model</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6611690808c477314c9f5187f121ee68/href">https://medium.com/media/6611690808c477314c9f5187f121ee68/href</a></iframe><p>Line 1: With the <strong>part ‘person_model.g.dart’</strong> we give the PersonModel class the possibility to access the methods inside of the person_model.g.dart file. The file will be generated later from the built_runner.</p><p>Line 3: The <strong>@JsonSerializable()</strong> annotation tells the build_runner that this class has to be concerned for the generation of a new file and creation of a serialization.</p><p>Line 5 + 8: For objects inside of our JSON we have to create their representing Model classes for NameModel and PictureModel. The new models will also be annotated with <strong>@JsonSerializable()</strong> and will also get the two new methods from line 12 and 14.</p><p>Line 12: The new <a href="https://dart.dev/guides/language/language-tour#factory-constructors">factory</a> constructor fromJson is close to our old method. But instead of creating a new Instance of the PersonModel, we call a method <strong>_$PersonModelFromJson(json)</strong>. This method will be generated later with the help of built_runner.</p><p>Line 14: The toJson method returns as expected a Json (in Dart a Map between String and dynamic). To receive the map we call the generated function <strong>_$PersonModelToJson(this)</strong>, and pass the current instance inside.</p><h3>Unleash the power of the built_runner</h3><p>After we have successfully created our model with the necessary annotations and functions, we are ready to go for the built_runner script. We open our project in the terminal and execute one of the following commands.</p><pre>// Inside of Flutter projects<br>// Generates the generate files once<br>flutter pub run build_runner build</pre><pre>// Watches the model files and generates on each change<br>flutter pub run build_runner watch</pre><pre>// Inside of Dart projects<br>// Generates the generate files once<br>pub run build_runner build</pre><pre>// Watches the model files and generates on each change<br>pub run build_runner watch</pre><p>For the case that you have a regular dart project, I also added the commands for the consistent Dart packages creation. This command will create for you the additional *.g.dart files. These files can be inserted into .gitignore, as everyone in the team can execute this command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/319/0*jchNilOgRa3We0wl.png" /></figure><p>Let us have a more in-depth look into the generated file from the serialisation. Here you can see the two functions that we call in the fromJson and toJson of the partial class.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d6d812e099e86a1ff92a04fea21af11c/href">https://medium.com/media/d6d812e099e86a1ff92a04fea21af11c/href</a></iframe><p>Here are all the strings that we had to create beforehand inside of these methods. Thanks to built_runner they getting now generated for us. If you take a look at line 18, you can see that even the child models are generated correctly. If we now change something in our class and execute once more the build runner (or let it watch), then we will see how it gets added to the list automatically.</p><h3>Benefits</h3><ul><li>Modifications to the class are instantaneously reflected</li><li>Lower maintenance due to less written code</li><li>Types are directly set via the attributes</li><li>No magic happens, the generated files are in the project</li></ul><h3>Disadvantages</h3><ul><li>Initial setup is increased</li><li>There is some boilerplate involved</li><li>You have to make sure everyone on the team is aware of the build_runner function (possible solution would be a script or a good readme.md file)</li><li>Generated files could distract from the real model files</li></ul><h3>Packages for Flutter JSON Serialization</h3><p>There are several other packages that you can use for generated JSON Serialization.</p><h4><a href="https://pub.dev/packages/built_value">built_value</a> / <a href="https://pub.dev/packages/built_collection">built_collection</a></h4><p>The built_value or built_collection can handle JSON Serialization in a very similar way as we did in json_serializable. But add beneficial functions like immutability, comparability and other quality of life functions.</p><h4><a href="https://pub.dev/packages/dart_json">dart_json</a></h4><p>The dart_json has the benefit that it is absolutely dependency less. If you search for a solution with as few dependencies as possible this package is your best bet.</p><h4><a href="https://app.quicktype.io/?share=Dxzba5UONSYqWKLpCbog">JSON Web parser</a></h4><p>There is some JSON Web parser that creates out of your JSON a valid dart model for you. You can copy a JSON into the left side and copy the model on the right side into your application.</p><h3>Conclusion</h3><p>JSON Serialization is a crucial topic, primarily if you work with a lot of external requests and different API´s that are changing their contracts from time to time. These should lead to more productivity so that we can implement significant features easier.</p><p>I made a poll on twitter to see which framework is the most used at the moment, but it seems it is pretty close together. My recommendation is to take a look at each package/solution and then use which one fits your needs best.</p><h3>Max Weber 💙 on Twitter</h3><p>Hey everyone, its again poll time. What is your favourite Flutter / Dart JSON Serializer? And please let me know why or if I missed an important one :) #flutterdev #jsonserializer #API</p><p>Thank you for reading and stay curious.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd5acd5e7521" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/step-by-step-guide-for-flutter-json-serialization-fd5acd5e7521">Step-by-Step guide for Flutter JSON Serialization</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Everything you need to know about Flutter Navigation]]></title>
            <link>https://medium.com/flutter-community/everything-you-need-to-know-about-flutter-navigation-d0c5e549b3c?source=rss-9f49bfc60bf8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0c5e549b3c</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[navigation]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[dart]]></category>
            <dc:creator><![CDATA[Max Weber]]></dc:creator>
            <pubDate>Sat, 28 Mar 2020 14:45:20 GMT</pubDate>
            <atom:updated>2020-03-28T14:45:20.055Z</atom:updated>
            <content:encoded><![CDATA[<h3>Three ways to handle Flutter Navigation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iDfG9OESvr26P62yo_-klg.jpeg" /><figcaption>Navigation in Flutter</figcaption></figure><p>We have to think about navigation and how we can optimize the work with our navigation route pattern. Today I show you how you can manage your routes easy and how you can navigate in the first place.</p><h3>Why is navigation important</h3><p>Navigation is in every application a vital part, and the benefit of Flutter is, that it already contains an excellent routing system built-in. The benefit of a built-in routing system is a huge advantage that we have as flutter developers. As always, we have to know about the hidden traps and understand the tools so that we can decide for the best option for a given use case.</p><p>With a good routing strategy, you have a lot fewer problems in the future, and it also helps you to reduce boilerplate and maintenance cost in the long run.</p><h3>How do we navigate in Flutter</h3><p>In Flutter we have three different options of navigating between screens.</p><ul><li>Direct Navigation with MaterialPageRoute</li><li>Static Navigation with Route Map</li><li>Dynamic Navigation with Generated Routes</li></ul><p>I want to show you all three options on a minimal app that I created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*5fqlb_39JnBd22DDxrTxUA.gif" /></figure><h3>1. Direct Navigation with MaterialPage Route</h3><p>The primary navigation that you mostly use in prototyping is usually the direct navigation with MaterialPageRoute. You access an instance of the Navigator and push a new MaterialPageRoute inside. The route creates a new Widget that gets put on top of the navigation stack.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/933d4dc3e83092bba428efaca4daa9f3/href">https://medium.com/media/933d4dc3e83092bba428efaca4daa9f3/href</a></iframe><p>The MaterialPageRoute is responsible for more than just routing. It also controls the transition and keeps the old route in memory on the stack so that we can route back as soon as we want. For that, we should call Navigator.pop(). This method removes the first Widget from the stack.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fdanibj8Vjh4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Ddanibj8Vjh4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fdanibj8Vjh4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a66aba7d32d9bca3473ae19e6a1415a7/href">https://medium.com/media/a66aba7d32d9bca3473ae19e6a1415a7/href</a></iframe><h4>2. Static Navigation with Route Map</h4><p>The second option that we have is the route map, and this is the preferred way if you use a state management tool like, Provider or BloC pattern. You have the option to create a Map with String keys that identifies different WidgetBuilder Methods and take care of the navigation.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dc24c25c4ff7e81a1ff40f7d07b16d56/href">https://medium.com/media/dc24c25c4ff7e81a1ff40f7d07b16d56/href</a></iframe><p>The LobbyScreen.route, LoginScreen.route and GameScreen.route are just the static const String representation of the name of this route. Now you can execute the pushNamed against the Navigator to push the new route on top of the stack.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d29d53f007dc560c57fdcf3e221bddd6/href">https://medium.com/media/d29d53f007dc560c57fdcf3e221bddd6/href</a></iframe><p>The static “route” is a variable that contains a string that identifies the route to the specific Widgets. Be mindful that if one of your routes contains a slash as a prefix, you have to provide at least one path with a pure “/”. This is your primary path. The Widget Builder function, that the map represents for the different routes, getting used to create a MaterialPageRoute inside of the Flutter Framework to navigate to the different Views.</p><p>The only disadvantage is that you cannot pass a value inside of a route. The possiblity to pass arguments to the route will be handled by the dynamic navigation.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FaIybkG2tJ_8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DaIybkG2tJ_8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FaIybkG2tJ_8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3d0f5280fd5359a07bae8c917fcb93b8/href">https://medium.com/media/3d0f5280fd5359a07bae8c917fcb93b8/href</a></iframe><h4>3. Dynamic Navigation with onGeneratedRoute</h4><p>The third option that I would like to add is the option to create an onGeneratedRoute. The onGeneratedRoute has the advantage that you can create routes and access the passed through arguments.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8e12caba21538849a2c4fbf233c77d3e/href">https://medium.com/media/8e12caba21538849a2c4fbf233c77d3e/href</a></iframe><p>The initial route takes still the responsibility to add the correct route to the stack. The benefit is now, if we call pushNamed, we can use the value of the argument and pass more information into the route. We can initialize the Widget with additional information. So if we push, for example from the Login Screen to the Lobby Screen, we can pass some arguments into the pushNamed method.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8764307b03545d51655d5a8acb544115/href">https://medium.com/media/8764307b03545d51655d5a8acb544115/href</a></iframe><p>As you can see, the push namedMethod takes a parameter called “arguments” which is anything (Object). In our case, we pass a map down that contains a user message.</p><p>If we change now the onGeneratedRoute that it accepts the argument and passes it down to the LobbyScreen, we pass information into another route with this solution.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6b5309a70a29fb726d92569911e459f8/href">https://medium.com/media/6b5309a70a29fb726d92569911e459f8/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f67104ee53e9525d9016ef69ceb295ee/href">https://medium.com/media/f67104ee53e9525d9016ef69ceb295ee/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*8GQcM9NOWl5aoM6-s7FwHw.png" /></figure><p>Disadvantage of this solution is that you will lose all types here, so you have to type check against it later on.</p><h3>Packages</h3><p>Of course, this is the build-in options for routing and navigation, and there are loads of fabulous packages that could help you optimize your code even further. Some packages that I can recommend are.</p><h4><a href="https://pub.dev/packages/fluro">Fluro</a></h4><p>Fluro is an excellent addition to the already existing router system, that makes it way more comfortable to use custom transitions between screens.</p><h4><a href="https://pub.dev/packages/angel_route">Angel Route</a></h4><p>You worked maybe with an HTTP Server before. Angel Route comes from the Angel HTTP Server. The routing system is in this case isomorphic, and it keeps your code clean and makes it easy to read. Additionally, it handles the pass over of id’s and other information slightly more accessible.</p><h4><a href="https://pub.dev/packages/flutter_modular">Flutter Modular</a></h4><p>This package is not a simple routing framework. It is more a general project architecture, but it adds many functionalities to the router and uses the standard routing system very smart.</p><h3>Conclusion</h3><p>Flutters Navigation system is reliable and should help your project in nearly all cases to find the right tooling. There are just a few things that you should keep in mind. But most of the Routing system is already part of the Flutter Framework.</p><p>If you search the source code for these example you can find it here:</p><p><a href="https://github.com/md-weber/navigation_tutorial">md-weber/navigation_tutorial</a></p><p>If you search further material on Navigation and route I highly recommend you the talk of Simon Lightfood about Navigator and Transitions.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPLq83k-ITj6lRcvjm8dk3201F0d5jUbLXb%26start%3D22&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D4CYTTW6PMoc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F4CYTTW6PMoc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/70ba940b9c0b92b50227ce27e13a0a0b/href">https://medium.com/media/70ba940b9c0b92b50227ce27e13a0a0b/href</a></iframe><p>Thank you for reading and curious!</p><p><a href="https://www.twitter.com/FlutterComm">JavaScript is not available.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0c5e549b3c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/flutter-community/everything-you-need-to-know-about-flutter-navigation-d0c5e549b3c">Everything you need to know about Flutter Navigation</a> was originally published in <a href="https://medium.com/flutter-community">Flutter Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup a Flutter Web Project on GitHub Pages]]></title>
            <link>https://itnext.io/setup-a-flutter-web-project-on-github-pages-58b3118b0a28?source=rss-9f49bfc60bf8------2</link>
            <guid isPermaLink="false">https://medium.com/p/58b3118b0a28</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutterexplained]]></category>
            <dc:creator><![CDATA[Max Weber]]></dc:creator>
            <pubDate>Thu, 13 Feb 2020 14:02:40 GMT</pubDate>
            <atom:updated>2020-02-19T07:42:37.954Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WMOpLszoo5z91ZwzPPhBHA.jpeg" /></figure><p>After my last <a href="https://dev.to/myracledesign/my-flutter-journey-3ndj">blog entry,</a> I got asked how I created a web project in Flutter and how I managed to deploy it. So join me on the journey how to create a Flutter web app and implement the whole thing on GitHub Pages.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F54SM24tLlhc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D54SM24tLlhc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F54SM24tLlhc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/70e51fd358185aeae15ba88a61dcb64f/href">https://medium.com/media/70e51fd358185aeae15ba88a61dcb64f/href</a></iframe><h3>Flutter Channels</h3><p>To enable flutter web, you have to set up your Flutter CLI properly, and after that, you have to make sure you are on the right channel. Today when I write this post, Flutter web is still in beta, so we have to select a branch that supports beta features.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e7059c0c3913eb3c9227b6aeec035629/href">https://medium.com/media/e7059c0c3913eb3c9227b6aeec035629/href</a></iframe><p>The master channel is the current tip of development. It contains the newest changes in the framework but it is also vulnerable to breaking changes. So that means in the worst case something is going wrong. The beta channel is a code selection of the flutter team once a month to a branch that contains the newest released features. It is selected and more stable. So if you want to try around, this would be the channel to go.</p><p>For more information about the channels in Flutter, take a look <a href="https://github.com/flutter/flutter/wiki/Flutter-build-release-channels">here.</a></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8fd1161d1bd5fcb7c738a1255aaae93f/href">https://medium.com/media/8fd1161d1bd5fcb7c738a1255aaae93f/href</a></iframe><h3>Enable Flutter Web</h3><p>After we set the correct channel and downloaded the new version of flutter, we have to enable the web development model.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ec13bdee43eaa1034d2b1b6d47e204b6/href">https://medium.com/media/ec13bdee43eaa1034d2b1b6d47e204b6/href</a></iframe><p>Now we are ready to go. Next, we have to create a basic Flutter project. This will create all the relevant folders for us.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dbd3fe59277f68b700f53462a3385dfb/href">https://medium.com/media/dbd3fe59277f68b700f53462a3385dfb/href</a></iframe><p>Flutter create will create all the relevant folders for us. If we open up that project, we should see now the folder “web” inside of the project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*mR9xOseDp0B4ispk2cDXMA.png" /></figure><p>The last step is to run the app. So go into the project folder and run flutter devices. We should see now chrome and Web Server as a choice.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0b8fd81c5f43e45459c67d72589d7065/href">https://medium.com/media/0b8fd81c5f43e45459c67d72589d7065/href</a></iframe><p>After the flutter run -d chrome command, the chrome browser will start up and reveal the Flutter app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vwc1Jg9YTUVEdYoXpT2HhA.png" /></figure><p>Perfect, we did it!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fwrzf9P70YWLJK%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fwrzf9P70YWLJK%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Fwrzf9P70YWLJK%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/7febdd8c58f9b865b38333d07e6847b9/href">https://medium.com/media/7febdd8c58f9b865b38333d07e6847b9/href</a></iframe><h3>Deploy on GitHub</h3><p>Before we can deploy, we have to create a new repository in GitHub and in order to use it as GitHub pages, it needs to have a specific naming convention.</p><blockquote>Template: &gt;GitHub-UserName&lt;.github.io<br> Example: <a href="https://github.com/md-weber/md-weber.github.io">md-weber.github.io</a></blockquote><p>Now we can create anything that we want in our Flutter app. If we are ready to go we have to build the app.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b1a8576374320f3e2ec80c97f76aa69c/href">https://medium.com/media/b1a8576374320f3e2ec80c97f76aa69c/href</a></iframe><p>After that in your project will be a build/web folder. This folder contains all the files that you will need to upload to your GitHub Repository. Open a terminal and switch to the folder and push it into your repository.</p><p>If you are new to GitHub and Git this <a href="https://product.hubspot.com/blog/git-and-github-tutorial-for-beginners">Guide</a> could help you.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ba4b771e131ca46f0b4500dd07cfad47/href">https://medium.com/media/ba4b771e131ca46f0b4500dd07cfad47/href</a></iframe><p>After the push, GitHub will take care of the rest. It immediately creates for you an environment and pushes your changes to the website.</p><p>Inside of your GitHub repository, you will find a new Tab called environments. In this tab, you can see how far your deployment process is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*khLg5jZi7aqUClpWiGs_Sg.png" /></figure><p>Now you can enter find under <a href="https://::username::.github.io">https://::username::.github.io</a> or my example <a href="https://md-weber.github.io/">https://md-weber.github.io/</a>.</p><p>If you get at that stage a 404 error please try to add the /index.html to your path and now you should see your very first Flutter Web App.</p><p>Thank you for reading!</p><p><a href="https://www.buymeacoffee.com/dashboard">Login - Buy Me a Coffee</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58b3118b0a28" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/setup-a-flutter-web-project-on-github-pages-58b3118b0a28">Setup a Flutter Web Project on GitHub Pages</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Flutter Story]]></title>
            <link>https://medium.com/@myracledesign/my-flutter-story-6dbf78ea4359?source=rss-9f49bfc60bf8------2</link>
            <guid isPermaLink="false">https://medium.com/p/6dbf78ea4359</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Max Weber]]></dc:creator>
            <pubDate>Wed, 12 Feb 2020 19:10:27 GMT</pubDate>
            <atom:updated>2020-02-12T19:10:27.952Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p6gaFZnq6llWcVI-Okt2_g.jpeg" /></figure><p>Frankly, the first time I heard about flutter was at the Google I/O 2019. For me, who always enjoyed working with Hot Reload and hated the way how Xamarin works for mobile apps. I was searching for a hybrid programming pattern for both android and iOS devices. Even though React Native was already out, it has the same foundation. JavaScript, this is not necessarily bad, but it has its own downsides.</p><p>I searched for a strongly typed language that shows me errors before I am falling for them. Now after one and a half year I can say that I transformed from an Angular 2+ engineer to a flutter engineer and I even started my own Youtube Channel with the topic FlutterExplained.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPLq83k-ITj6lQyw2sCawoRNnSGKZYuuUYh&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fplaylist%3Flist%3DPLq83k-ITj6lQyw2sCawoRNnSGKZYuuUYh&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FiHIhnALkFj0%2Fhqdefault.jpg%3Fsqp%3D-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ%3D%3D%26rs%3DAOn4CLBURe2Aw0j_a0BQcUlRaAtM2yM1Gg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="853" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4a345f44fc2128939108d366dca34089/href">https://medium.com/media/4a345f44fc2128939108d366dca34089/href</a></iframe><h3>First steps</h3><p>I started by creating some smaller prototypes. Without knowing the Dart Language, I wanted to create my first web app, which I did with the help of <a href="https://dev.to/chingu">Chingu.</a> <a href="https://dev.to/chingu">Chingu</a> is a platform where you collaborate with other members of a community to create a new project.</p><p>The first time I used Flutter I used it in a Web Project and developed the backend with <a href="https://aqueduct.io/">Aqueduct</a>. <a href="https://aqueduct.io/">Aqueduct</a> is a framework in Dart, with that you are able to create a scalable backend. That was a fantastic time, learning Heroku added some CI/CD with Github Actions and was able in two weeks to create a <a href="https://digital-journal-client.herokuapp.com/">web journal</a> full out of Flutter.</p><p>It was far from perfect but jeez I was so proud of it. I wrote <a href="https://medium.com/flutter-community/how-i-created-my-first-flutter-web-app-b6366ff43ba3">articles</a> and showed it in the community, and they liked it very much. That gave me the drive to work harder on my Flutter skills. At the end of 2019, I finally quitted my Freelance contract and started working full time on Flutter.</p><h3>Starting with my Flutter Journey</h3><p>I wanted to enhance my Flutter knowledge, I completed a certificate on Udemy from the “The Complete 2020 Flutter Development Bootcamp with Dart&quot;. I was glad that I have done it, just to see all things once more together and understand more of the core concepts.</p><p>After that, I tried to replenish my social media channels. My <a href="https://twitter.com/max_myracle">Twitter</a> activity was not existent and my old <a href="https://www.youtube.com/channel/UCgUnLn1FpuHHmO66vn4o1NA">youtube channel</a> with around 20 subscribers was not worth a lot. Additionally, I had some ideas in my mind that I wanted to realise. Creating a world travel companion and even an electric calculator (which is currently in Alpha). That was the start of my journey.</p><p>First, I developed the electrical calculator to see if I can manage to create an app in one week, and well thanks to Flutter I did! There are some improvements that I have to do, but it will be released in the next weeks. Also, I started with my youtube channel and got till now 400 views on a “MediaQuery and LayoutBuilder” Video, which I used to create a better user experience in my app.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F7kn27lnYSAE9O%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F7kn27lnYSAE9O%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExd2s4ZHlia2ltaXE0d2JvcW16ZnVhNmhneXJ2bDVycjRiamR6ejF5ZyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F7kn27lnYSAE9O%2Fgiphy_s.gif&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="339" frameborder="0" scrolling="no"><a href="https://medium.com/media/c8c4f6b637cd445526d536a878a418e9/href">https://medium.com/media/c8c4f6b637cd445526d536a878a418e9/href</a></iframe><p>This is super exciting and I am thrilled that it works like that. This motivates me to improve myself even further so that I can explain everyone, even better the pros and cons of Dart and Flutter Development.</p><h3>Advantages</h3><p>I have never learned that much in such a short amount of time. Also for the videos that I prepare, I have to continually improve myself. Learning to cut videos, add effects, creating better boilerplates, learning flutter details and dart packages. Additionally, my partner and me are working to setup up our own startup which takes time to prepare pitches and talk to investors.</p><p>My <a href="https://github.com/md-weber?tab=overview&amp;from=2020-02-01&amp;to=2020-02-10">Github</a> Repository explodes thanks to all the commits and if you compare it to 2014 when I draw little pictures in my timeline, it is a dramatic increase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uxsqlqSPChedY1xKEmSSDw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lo_amJPWjd3BM7wZO3KrgQ.png" /><figcaption>d</figcaption></figure><p>Furthermore, I found a way into the flutter community and had the opportunity to talk with people who have the same interest as me. To be part of this new and interactive community is just amazing and the people encourage you to be a better developer in every aspect.</p><h3>Downsides</h3><p>Currently, I am living from my hard work of last year, and there are less till no projects for Flutter Development in Germany. So my clear goal to earn money with Flutter is to create my own products, services and apps. Also, my <a href="https://www.youtube.com/channel/UCgUnLn1FpuHHmO66vn4o1NA">Youtube Channel</a> is one of my critical hopes for income. But there are a lot of barriers and if you think you can earn money with <a href="https://www.buymeacoffee.com/MyracleDesign">BuyMeACoffee</a> … well, think again.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3o6UB5RrlQuMfZp82Y%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3o6UB5RrlQuMfZp82Y%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F3o6UB5RrlQuMfZp82Y%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="322" frameborder="0" scrolling="no"><a href="https://medium.com/media/d939582fa4ab5483bbfaaacd565d3710/href">https://medium.com/media/d939582fa4ab5483bbfaaacd565d3710/href</a></iframe><h3>Future perspective and Goals for 2020</h3><p>I still have to learn a lot about BloC pattern, state management and advanced API handling with built_value and built_collection, but that does not keep me away from working further with this great technology.</p><p>I would say there was never a technology stack that cared so much about the needs and desires of their developers. The users love the material design and flexibility. Designers see their creation coming alive in no time. The community seems to be still small but is one of the best groups I have ever worked with. All these things combined make me love Flutter.</p><p>My goal for this year is to earn a living from Flutter development. The dream would be to go full time on youtube and earn my money as a flutter tutor and speaker. Additionally, I want to publish at least two apps this year.</p><p>Thank you for reading so far, please feel free to share your journey with us. I would love to hear more about it.</p><p><a href="https://www.buymeacoffee.com/MyracleDesign">Max on Buy Me A Coffee</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6dbf78ea4359" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Defeat hate in Programming. Now!]]></title>
            <link>https://medium.com/@myracledesign/defeat-hate-in-programming-now-7ca1edaa9d36?source=rss-9f49bfc60bf8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ca1edaa9d36</guid>
            <category><![CDATA[emotions]]></category>
            <category><![CDATA[knowledge]]></category>
            <category><![CDATA[hate]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Max Weber]]></dc:creator>
            <pubDate>Tue, 21 Jan 2020 10:19:58 GMT</pubDate>
            <atom:updated>2020-01-21T10:19:58.385Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rXqsLbtsGTQeE-TEt6VLew.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/@punttim?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels"><strong>Tim Gouw </strong></a>from <a href="https://www.pexels.com/photo/man-in-white-shirt-using-macbook-pro-52608/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels"><strong>Pexels</strong></a></figcaption></figure><p>I found a post with a question about the most unfavored programming language that I ever worked with and found the following sentence.</p><blockquote><strong><em>I HATE JavaScript. Period.</em></strong></blockquote><p>Sure thing, we hate some food, or we hate a specific work, but why do we have such strong feelings against our tools? And is it even a good idea to feel that hate in programming? I will give you good reasons to not hate programming languages or other means and give you some tips on how you can change your feelings about topics you hate.</p><h3>What is hate?</h3><p>Before we start the topic, we have first to define hate. It is a feeling that we all have and all of us would agree that we have the same understanding of hate. So let us find a good definition that we can use.</p><p>According to Jose I. Navarro is hate a […] deep and extreme emotional dislike. The objects of such hatred can vary extensively. […] In childhood and adolescence, the attitudes of intolerance-impregnated with hatred — are formed, and these are extremely difficult to eradicate later.</p><p>That means we do not like something, and it is very, very difficult to change this feeling later. According to that, we know that as soon as we “hate” something, it is super hard to change that opinion again.</p><h3>Blocking to learn</h3><p>The first significant disadvantage of hate a programming language is that it blocks your brain of learning it. You will always stumble about the things you do not like about the language and will never see the benefits of the language and also the achievements that this language managed to achieve. The concentration will always be on the negative side, and this is hard to overcome.</p><p>As a software engineer, we have to learn every day. There is always a new API or another Framework. Our bosses have a great idea, or our colleagues want to try something new. So if we hate a subject that we have to work in makes us less value in that task. That lack of motivation could lead to bad performance and could, in the worst case, cost our job.</p><p>Learning is a challenging task, and it costs a lot of energy. So if we do not enjoy a topic, we start to block and concentrate on something we like. That leads to even worse learning results and because we cannot learn something, we begin to hate it, even more, this leads to a vicious circle that is very hard to escape.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ftenor.com%2Fembed%2F3456638&amp;display_name=Tenor&amp;url=https%3A%2F%2Ftenor.com%2Fview%2Fangry-panda-mascot-mad-gif-3456638&amp;image=https%3A%2F%2Fmedia.tenor.com%2Fimages%2F3390f4d4f5d7cdeda6faa932d514cfcb%2Fraw&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=tenor" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/7aab53f925ce3da0020879673886084f/href">https://medium.com/media/7aab53f925ce3da0020879673886084f/href</a></iframe><h3>Block opinions and support bad decisions</h3><p>If we hate something, we tend to disagree with everyone who has another opinion on a topic. If someone is telling you that he achieved something in a subject you hate, you will start to lower his result. The same will happen if you hate something and a colleague brings up a good idea if you hate already what he is saying you maybe lose a great opportunity and even worse, discourage your workmate so that he will never come up with a good idea.</p><p>With this in mind, there is a lot of potentials that we may be a disgrace because we “hate” a tool or a framework. Even if it is maybe the best tool for the job and instead decide for something else that perhaps brings technical debts for the next couple of years, just because we hated something. Never underestimate how vital our opinion about a tool is because Product Owner and Decision-maker have to trust our expertise as Engineers when it comes to development. So you are one of the most essential sources of knowledge in that area.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ftenor.com%2Fembed%2F3355498&amp;url=https%3A%2F%2Ftenor.com%2Fview%2Fimmediately-regret-this-decision-regret-oops-decision-bad-gif-3355498&amp;image=https%3A%2F%2Fmedia.tenor.com%2Fimages%2F32d05edffe6687b1584e88167efe2958%2Fraw&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=tenor" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/b5531bd7167572c1bd7f3d1c37d7a27f/href">https://medium.com/media/b5531bd7167572c1bd7f3d1c37d7a27f/href</a></iframe><h3>Lack of motivation</h3><p>So you hate to work with, for example, Visual Studio Code, but your chef can not afford a Jet brains license. (Which should always be possible) You will immediately be discouraged, and if you hate it, you close yourself the opportunity to learn something new, and maybe find new plugins and tools that can help to increase your productivity.</p><p>This could lead to reduced motivation and also to a decrease in productivity. I do not say you have to be a professional Visual Studio guru with all short cuts and best in slot plugins, but it is crucial to see that sometimes things can not be changed and you have to tackle the problem rather than to give up.</p><h3>What can we do against the hate?</h3><p>So what can we do against the hate against a tool or technology? Is it even possible to escape hatred? It is a sturdy path and needs a lot of self-motivation, but it is worth it believe me.</p><h3>Think about the great achievements that come with it.</h3><p>Let’s take JavaScript, for example, it is the most known language in the world. Every browser supports it and whoever develops in the web needs to know at least the basics of JavaScript. No one of us would read this article without JavaScript because Hashnode consists out of it. Even when google tried to get rid of JavaScript and introduced Dart, the browsers did not follow their example, because JavaScript is everywhere and nowadays even Dart compiles into JavaScript. So without JavaScript, the web like it is today, would not exist. I think I only met once or twice a purist that deactivated JavaScript in their browser and this was mainly because of security aspects.</p><p>Additionally, it has a lot of things that other languages referenced from JavaScript to make their language even better like the <a href="https://www.sitepoint.com/es6-arrow-functions-new-fat-concise-syntax-javascript/">Arrow Functions</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax">Spread operator</a> or yet functional programming in Java 8.</p><h3>See something that you enjoy with the language</h3><p>JavaScript is absolutely crazy, and there are some funny videos about the quirks of the languages. And some creatives even created some esoteric programming things out of it like <a href="http://www.jsfuck.com/">jsfuck</a> where you can write every code in JavaScript with only 6 letters. So if you enjoy, for example, the <a href="https://www.destroyallsoftware.com/talks/wat">wat video</a> you could try to understand what is the reason for the problems that are explained.</p><p>This could give you complete new insight into the language and also could improve your perception and understanding of other languages. And this is always awesome right. So things we hate, have something that we can enjoy if we are open-minded and do not let our feelings come into our way.</p><h3>Conclusion</h3><p>So now we are here, is hate a good advisor. I would say no, it blinds our senses and sometimes comes with enormous costs for us and our colleagues. My mum always told me that hate is a pretty strong feeling about something and does not help anyone. I think she is right.</p><p>I know that this topic is a very emotional one, but I would love to hear what do you think about hate in programming?</p><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ca1edaa9d36" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Mobile: Scrum Poker App]]></title>
            <link>https://medium.com/flutter-community/flutter-mobile-scrum-poker-app-c72d5d5514ea?source=rss-9f49bfc60bf8------2</link>
            <guid isPermaLink="false">https://medium.com/p/c72d5d5514ea</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[mobile]]></category>
            <dc:creator><![CDATA[Max Weber]]></dc:creator>
            <pubDate>Wed, 23 Oct 2019 10:01:01 GMT</pubDate>
            <atom:updated>2019-10-23T10:01:01.251Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1sb2_2-9hvnCrL6QfSxlyA.jpeg" /></figure><p>Welcome to my story, how I created a Scrum Card App with flutter in one day. With this article, I want to show you how simple it can be to create a flutter app. My challenge was to create a minimal app in a short time.</p><p>First, I want to start by creating a clear picture of what we want to achieve. I work currently on a Scrum Team, we always have to carry around our cards for sprint poker. These cards are old, dirty and very often used from a lot of teams and so I decided to change that with an app, once and for all.</p><h3>Scrum Poker</h3><p>If you have never worked in a Scrum Team before, you maybe never heard the term Scrum Poker. To explain the whole idea, would probably be too much for that story, but if you are interested <a href="https://medium.com/@ravindraprasad">Ravindra Prasad</a> wrote an excellent <a href="https://medium.com/@ravindraprasad/story-point-estimation-and-planning-poker-3a0938a6b5ca">article</a> about that topic.</p><blockquote><em>It is like real poker, but everyone has the same cards.</em></blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FhttS0Xzi9ZMQ0%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FhttS0Xzi9ZMQ0%2Fgiphy.mp4&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FhttS0Xzi9ZMQ0%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="318" frameborder="0" scrolling="no"><a href="https://medium.com/media/96de410cecc7d8da3efcf39eaae0844d/href">https://medium.com/media/96de410cecc7d8da3efcf39eaae0844d/href</a></iframe><h3>Visual guidance</h3><p>For me, it is always helpful in my projects to have visual guidance like a prototype. This prototype can be a drawing on a paper or a fully-fledged prototype. For this article, I created a quick prototype in Adobe XD just to show you how it can look like and to give myself visual support.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*2O3nRWRE5hJKtoWV.gif" /></figure><p>With that, we have a prototype and now we know what we want to create. Now we are ready for development. First of all, we have to create a new project with Flutter. On the <a href="https://flutter.dev/">Flutter Website</a>, there are more information on how to set up your environment. I will use for this story <a href="https://developer.android.com/studio/">Android Studio</a> with the Flutter and Dart plugin.</p><h3>Restructure our boilerplate</h3><p>After the setup of the flutter project, let us start with removing all the comments that we do not need. I separate the Home Page from the main file so that we have a better feeling for our application. With that, we bring a bit more order in the project boilerplate. In our main file, this is what should remain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/0*hhXb0Lda5y2TWEMt.png" /></figure><p>In the “myHomePage.dart” you will find the Stateful “MyHomePage” Widget that is initialized with the flutter project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/0*ua5YszqomEaaNW2b.png" /></figure><p>And the following image should be the folder structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/0*M74elC7dN7d5OQjj.png" /></figure><h3>Our HomePage</h3><p>For our first shot, we want to use the existing Scaffold of the HomePage. This contains our scrum cards and a Flutter GridView. The GridView gives us the option to align multiple items in a grid. The count constructor of the GridView provides us, with the out-of-the-box functionality, to create our Grid with Cards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/0*9_3g7CxbKks8DLnh.png" /></figure><p>First, we initialize a variable “Fibonacci” so that we can contain the numbers in an array. If you take a closer look into the children of the count constructor of the GridView you can see the “for Loop”. Is this not great? We can loop inside the children array to map our Fibonacci array to placeholders.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*t1tcsqdr8M5q4VmS.png" /></figure><p>Great, the Grid looks already very promising. Did you see how the Placeholder widget is handy in this part? With that in place, we do not have to create anything for the card just yet. However, the result is already evident. The Placeholders help us to structure already our app without actually implementing something.</p><h3>The Cards</h3><p>Now that we have the basic structure in place, we have to think about how we want to display our Cards. Thankfully Flutter provides already something for us. The Card Widget will help us to create excellent visualization of the cards with Text inserted. Because the cards will not change, we can create a stateless widget for it with an icon or a number. For now, it will live in the “MyHomePage”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/0*yp4nm_0wzjFPZn3b.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/0*fgRjzuuXXo1JPMYF.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*59JmQA1f5uD9iXq8.png" /></figure><h3>Gestures</h3><p>Now it is time to control our behaviour of the app. When we tap a card, it should remove the widgets from the tree and replace it with a single card widget. That, however, changes the state of the “MyHomePage” Widget.</p><p>To achieve that tap behaviour, we first have to surround our Card element with a GestureController. After that, we have to specify the onTap event inside of the card.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/0*idQ5hNKgkNNB6jZe.png" /></figure><p>This will now print every click on a card in a separate line in the console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*y-jCb6vTHFG3u16Q.png" /></figure><h3>Downtime</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/0*PAEZbfog2IU1nF1h.gif" /><figcaption>Credits to <a href="https://giphy.com/gifs/break-i-need-a-RiWZUGcZPEKdQgrQ96">Giphy</a></figcaption></figure><p>Alright, we made it very far already. So let’s take a break and recap shortly, what we created already.</p><ul><li>a Design for our Scrum Card App</li><li>a HomePage</li><li>a ScrumCard widget</li><li>Gestures and tapping event</li></ul><p>The next thing that we need to do is to change the state of our app, after a tap. Whenever a card is tapped we want to replace the Body from the HomePage with a Big ScrumCard Widget.</p><p>Now comes the tough part so. Therefore make yourself ready, take a deep breath and then let’s get into it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*io2xt2tf9CC1ROQh.gif" /><figcaption>Credits to <a href="https://giphy.com/gifs/angrybirds-angry-birds-matilda-the-movie-l0K4jwyp6FZa9phyU">Giphy</a></figcaption></figure><h3>State Management</h3><p>There are two different kinds of Widgets in Flutter.</p><ol><li>Stateless Widgets</li><li>Stateful Widgets</li></ol><p>The stateless widget is a widget that will always be shown according to its initial values. During its lifetime the initial values can not change. The stateful widget, on the other hand, contains a real state and if you change the state the widget will be re-rendered. If you want to read more about the different types of widgets feel free to take a look at the <a href="https://proandroiddev.com/flutter-a-hitchhiker-guide-to-stateless-and-stateful-widgets-cc9f9295253b">article</a> by <a href="https://proandroiddev.com/@DakshHub">Deepak K</a>.</p><p>Now we have to first time handle the state of our widgets. When we click the button the state of the “Grid Widget” should change to a big “Card Widget”. This tells us that we have at least two different states in our app. To keep track of these states we have to change our current “Stateless” Widget to a “Stateful” Widget. The easiest way is to click on Stateless Widget and use the IDE function to change the Stateless Widget to a Stateful Widget.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/0*3vSFfGFhJBdxbAlL.png" /></figure><p>Because the new Widget is now stateful, we can change its value and the “build” method can react to these different states.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/0*2NxijOmH-Hsxm2tZ.png" /></figure><p>We want to track the information of the Icon that we want to show or the Text that is visible on the card so we need that to a state. I call that variables “singleCardText” and “singleCardIcon”. Additionally, I want to have a boolean that knows if I have to show the Main Page with all Cards or just the Single Big Card.</p><p>Be careful at that point, I made here a big mistake and put all these variables in the build method. The build method gets called multiple times and whenever it gets called it overwrites the values again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/0*LMtXvUj9OtT9bgZq.jpeg" /></figure><p>Of course, that sounds trivial but cost me 1 hour of my lifetime.</p><h3>The Exchange</h3><p>Now we want to swap the widgets based on the “isHomePage” value. Therefore we can use one of Flutter skills. We surround our GridView.count constructor with an ternary operator. That checks our isHomePage and add the respective Widget to the Container.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/0*oh_q03_y6DcqaTJh.png" /></figure><p>If you get confused by the “?” and the “:” in the code I can recommend you to read an article about <a href="https://medium.com/flutter-community/simple-and-bug-free-code-with-dart-operators-2e81211cecfe">“Ternary Operator”</a> from <a href="https://medium.com/@dev.n">Deven Joshi</a>. With that in place, we have the opportunity to change the “isHomePage” to false and it would show us only the Padding (and whatever is there inside) or we keep it on true, and it will show us the GridView. Therefore we need the “setState” method. It will allow us very easy to change the current state of the widget.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/0*4xPaquxpnknkIZOS.png" /></figure><p>Great so far. Now instead of the tap where we just print something in the console, we want to execute the “switchToCard” method. But how? The method has to live in the _HomePageState and the ScrumCard has no access to that state? Alright then, let me explain it to you because there is a fairly simple solution to that problem. We just pass our function into the ScrumCard Widget. And whenever the user taps now on the card we call that method and “notify” our parent widget.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*d1vsyBw_L0C_LETy.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/0*ghXHbVu7-fu-6_2L.png" /></figure><p>If you take a brief look into the code snippets you can see that the ScrumCard calls the notifyParent method, which in fact is the switchToCard method. This should help us now to transform from a grid with multiple scrum cards, to a single big one and Vice Versa. Now there is only one step left, we have to create a beautiful Card UI that will be generated when the isHomePage is false.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/0*ONABEQT0c_NKr21A.png" /></figure><p>As you most likely already discovered I added here another function for notifyParent so that we can swap back to the HomePage.</p><p>Now the switch of card and grid should work already. To improve our app even more we can use the “ <a href="https://www.youtube.com/watch?v=2W7POjFb88g">AnimatedSwitcher</a>”. I found this amazing video from the flutter team and that is a perfect use case. The AnimatedSwitcher, as you maybe have already guessed, helps us to swap two widgets with each other. It adds a smooth transition between these two and this looks much more friendly. You just have to put your ternary operator in between as a child and give it a Duration how long the transition should take.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/0*c6uKLilVZeg7ZRIa.png" /></figure><p>Ok, so let’s run our simulator or emulator and take a look how the app looks now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/0*vn6whcL2zZf9kI_V.gif" /></figure><h3>Conclusion and What’s next</h3><p>This is now an app that already solves one important problem in software engineering. From now on I do not have any more to carry real cards from one room to another. Never again I will have to grab old smelly cards and show them to my Product Owner. We do not want to know which liquids touched those filthy cards…</p><p>This is of course just the beginning. With the knowledge that we got during this session, we can do much more. This app shows how easy it is with flutter to create a nice fully functional app.</p><p>Now it is your turn. My challenge for you till my next article is, to create this app or fork my <a href="https://github.com/MyracleDesign/flutter_scrum_cards">repository from GitHub</a> and extend this app by a small additional functionality. To give you some examples that you could add,</p><ul><li>Make it possible to change from Fibonacci numbers to other Scrum Poker numbers</li><li>Create a history of the selected cards</li><li>Make a custom Animation between the transitions</li></ul><p>And if you are finished spread the word and let everyone know how cool Flutter and our community is! I am already curious to see all the beautiful results. If you have any feedback let me know and if you are interested in other cool articles, feel free to follow me on <a href="https://twitter.com/max_myracle">Twitter</a> or take a look into my <a href="https://github.com/MyracleDesign">GitHub Repository</a>.</p><p><em>Originally published at </em><a href="https://myracle.hashnode.dev/flutter-mobile-scrum-poker-app-ck1vx6yxl004f3os10qi8u0o2"><em>https://myracle.hashnode.dev</em></a><em>.</em></p><p><a href="https://www.twitter.com/FlutterComm">JavaScript is not available.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c72d5d5514ea" width="1" height="1" alt=""><hr><p><a href="https://medium.com/flutter-community/flutter-mobile-scrum-poker-app-c72d5d5514ea">Flutter Mobile: Scrum Poker App</a> was originally published in <a href="https://medium.com/flutter-community">Flutter Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>