<?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 Ayush Bherwani on Medium]]></title>
        <description><![CDATA[Stories by Ayush Bherwani on Medium]]></description>
        <link>https://medium.com/@ayushbherwani?source=rss-cdf0fd1760ba------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*Iw2blcHT-LRD9lr8NTx8HQ.jpeg</url>
            <title>Stories by Ayush Bherwani on Medium</title>
            <link>https://medium.com/@ayushbherwani?source=rss-cdf0fd1760ba------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 21:52:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ayushbherwani/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[Platform channel examples]]></title>
            <link>https://blog.flutter.dev/platform-channel-examples-7edeaeba4a66?source=rss-cdf0fd1760ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/7edeaeba4a66</guid>
            <category><![CDATA[mobile-development]]></category>
            <category><![CDATA[events]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[gsoc]]></category>
            <dc:creator><![CDATA[Ayush Bherwani]]></dc:creator>
            <pubDate>Sat, 29 Aug 2020 09:49:07 GMT</pubDate>
            <atom:updated>2020-09-02T01:25:11.061Z</atom:updated>
            <content:encoded><![CDATA[<p>Google Summer of Code (GSoC) 2020</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5PoXySK4-tAKWAY1zCzfHg.png" /></figure><p>Google Summer of Code is an initiative by Google to promote open source among student developers, where students pair with a mentor and work with an open source organization for three months.</p><p>This year marks the 16th year of Google Summer of Code, and the first year of the Dart organization taking part in GSoC. Many students might be thinking, that’s great, but where is Flutter?</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3ogwFTfjbRk2iz89Mc%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fspongebob-spongebob-squarepants-episode-4-3ogwFTfjbRk2iz89Mc&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2F3ogwFTfjbRk2iz89Mc%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/9234a97b3bae764a04fe7725ef104db7/href">https://medium.com/media/9234a97b3bae764a04fe7725ef104db7/href</a></iframe><p>The good news is, the projects listed include both Flutter and Dart projects. (And to be clear, all Flutter projects are written in the Dart language, but not all Dart projects use the Flutter framework.) Check out all of the project ideas on the <a href="https://github.com/dart-lang/sdk/wiki/Dart-GSoC-2020-Project-Ideas">Dart wiki</a>.</p><p>This post showcases the final project, which demonstrates 3 different kinds of platform channels, and was written during the 3-month coding period, as well as an example of a federated plugin.</p><p>The completed Platform Channel sample demonstrates how to use different kinds of named channels to communicate with the host application, specifically:</p><ul><li>How to use MethodChannel to invoke platform methods.</li><li>How to use EventChannel to listen to continuous value changes from the platform.</li><li>How to use BasicMessageChannel and MessageCodec to send messages of different types across the platform.</li></ul><p>You can find the complete <a href="https://github.com/flutter/samples/tree/master/platform_channels">platform channel sample</a> on GitHub.</p><h3><strong>PlatformChannel sample</strong></h3><p>I was selected to create the PlatformChannel sample app, which aims to demonstrate how to send data back and forth in messages between Dart and native code using platform channels.</p><p>Flutter is a UI framework that allows you to paint beautiful pixels on the screen using the same Dart code across platforms, but what if you want to work with native APIs to access sensor events, hardware information, or access hardware like a camera, or biometrics? <em>Platform channels</em> are here to help. It’s a mechanism that allows you to communicate with your native host application and access the platform-specific APIs.</p><h4>MethodChannel <strong>demo</strong></h4><p>The MethodChannel demo demonstrates how to implement a <a href="https://api.flutter.dev/flutter/services/MethodChannel-class.html">MethodChannel</a> and invoke platform methods to increment and decrement the value of a counter.</p><p>Related PR: <a href="https://github.com/flutter/samples/pull/453">#453</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*raON7YDig_i1Lt88IsfjFA.gif" /><figcaption>MethodChannel demo in action</figcaption></figure><h4>EventChannel demo</h4><p>The EventChannel demo demonstrates how to implement an <a href="https://api.flutter.dev/flutter/services/EventChannel-class.html">EventChannel</a> to listen to continuous values from the device’s Accelerometer sensor. It also shows how to test the EventChannel implementation, which gives you a deeper understanding of how EventChannel works.</p><p>Related PR: <a href="https://github.com/flutter/samples/pull/462">#462</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LSMSOh-0dz8TCaKP2Z-CoQ.gif" /><figcaption>EventChannel Demo in action</figcaption></figure><h4>Platform Image demo</h4><p>The Platform Image demo demonstrates how to use <a href="https://api.flutter.dev/flutter/services/BasicMessageChannel-class.html">BasicMessageChannel</a> with <a href="https://api.flutter.dev/flutter/services/StandardMessageCodec-class.html">StandardMessageCodec</a> to load an image from native assets. It also solves <a href="https://medium.com/r?url=https%3A%2F%2Fgithub.com%2Fflutter%2Fflutter%2Fissues%2F20879">issue #20879: Would like an example of sending an image across </a><a href="https://medium.com/r?url=https%3A%2F%2Fgithub.com%2Fflutter%2Fflutter%2Fissues%2F20879">PlatformChannels</a>.</p><p>Related PR: <a href="https://github.com/flutter/samples/pull/475">475</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mc9V6dDcmV0qT6UpzX1AQg.gif" /><figcaption>Platform Image demo in action</figcaption></figure><h4>BasicMessageChannel &amp; different MessageCodec demo</h4><p>The BasicMessageChannel demo demonstrates how to use BasicMessageChannel and <a href="https://api.flutter.dev/flutter/services/MessageCodec-class.html">MessageCodec</a> to move structured data across platforms. In the demo, it uses a variety of MessageCodecs to send and receive data about pets.</p><p>Related PRs: <a href="https://github.com/flutter/samples/pull/484">#484</a>, <a href="https://github.com/flutter/samples/pull/496">#496</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oXELli8oLVJuWFW6BtdXjw.gif" /><figcaption>BasicMessageChannel Demo in action</figcaption></figure><h3>Federated plugin sample</h3><p>During my first video conference with my mentor, Andrew, he told me about an often-used quote at Google, to “always keep your wheels in the dirt”; in other words, “make sure that you aren’t stuck, but can make progress and move forward”. So, to keep my wheels in the dirt during GSoC, we decided that I would <em>also</em> work on a federated plugin sample. The sample aims to demonstrate how to build a <em>federated plugin</em> (a plugin divided into a different package for each platform implementation) to retrieve the current battery level of the device on different platforms. The sample also demonstrates how to work with platform channels to communicate with different platforms, including web and desktop. Currently, the plugin only supports Android and web. Support for Windows and Linux will be added soon.</p><p>Check out the <a href="https://github.com/flutter/samples/tree/master/experimental/federated_plugin">federated_plugin sample on GitHub</a>.</p><p>Related PRs: <a href="https://github.com/flutter/samples/pull/497">#497</a>, <a href="https://github.com/flutter/samples/pull/503">#503</a>, <a href="https://github.com/flutter/samples/pull/507">#507</a>, <a href="https://github.com/flutter/samples/pull/526">#526</a></p><p>Check out all of <a href="https://github.com/flutter/samples/pulls?q=+is%3Apr+author%3AAyushBherwani1998+">my PRs for flutter/samples</a>.</p><h4><strong>Other Contributions</strong></h4><p>Apart from working on the main project and contributing to the <a href="https://github.com/flutter/samples">flutter/samples</a> repository, I also contributed to the <a href="https://github.com/flutter/flutter">flutter/flutter</a> repository, and it has been a fabulous learning journey for me. During the GSoC period, I opened 20 pull requests, of which 16 got merged and three are still in review. Check out <a href="https://github.com/flutter/flutter/pulls?q=is%3Apr+author%3AAyushBherwani1998+">my PRs to flutter/flutter</a>.</p><p>Taking the first step and contributing to any open source project is often challenging. We all have encountered this situation, therefore to help the first time contributors and share my experience, I penned a blog, <a href="https://medium.com/flutter-community/contributing-to-flutter-getting-started-a0db68cbcd5b">Contributing to Flutter: Getting Started</a>.</p><h3><strong>Experience</strong></h3><p>It has been a great journey to work and learn under the mentorship of the Flutter team. For me, the best thing about GSoC is not the stipend but the mentorship and learning experience that I can cherish my whole life.</p><h4><strong>Mentorship</strong></h4><p><a href="https://twitter.com/redbrogdon">Andrew</a> has not only been a great guide but also a friend who has helped me to improve my technical skills and with my career-related questions. He always trusted my abilities and allowed me to explore and experiment with the samples. Whenever I was stuck on a problem, he proactively helped me to find a way around, or introduced me to someone from the Flutter team who could help me. The same goes for <a href="https://twitter.com/DomesticMouse">Brett</a>. Though not my primary mentor, he helped me whenever I reached out to him.</p><h4><strong>Learning</strong></h4><p>I am glad Andrew and I decided to follow the <a href="https://en.wikipedia.org/wiki/Test-driven_development">Test Driven Development</a> process, which has helped me to understand a different type of software development and get a better understanding of how platform channels work internally. Working on a federated plugin sample also gave me a chance to explore win32 development.</p><h4><strong>Challenges</strong></h4><p>Challenges are what makes GSoC a great learning journey. One of the hurdles we faced was designing the WinRT/C++ API for the federated plugin sample. Though we were not able to overcome it due to some constraints, doing research about the topic helped me to explore the other paths and find an alternate solution.</p><blockquote>That’s it for this article, I would like to thanks Andrew, Brett, and the Flutter team, who helped me to complete the samples and contribute to the Flutter SDK 🎉</blockquote><p><em>About the author: Ayush is an Undergraduate student who is passionate about developing efficient Mobile apps in both Flutter and Android. Apart from Mobile Development, his interest lies in developing Mobile DApps. You can connect with him on</em><a href="https://twitter.com/ayushbherwani"><em> Twitter</em></a><em>,</em><a href="https://linkedin.com/in/ayushbherwani"><em> LinkedIn</em></a><em>, and</em><a href="https://github.com/AyushBherwani1998"><em> GitHub</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7edeaeba4a66" width="1" height="1" alt=""><hr><p><a href="https://blog.flutter.dev/platform-channel-examples-7edeaeba4a66">Platform channel examples</a> was originally published in <a href="https://blog.flutter.dev/">Flutter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Contributing to Flutter: Getting Started]]></title>
            <link>https://medium.com/flutter-community/contributing-to-flutter-getting-started-a0db68cbcd5b?source=rss-cdf0fd1760ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0db68cbcd5b</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[community]]></category>
            <dc:creator><![CDATA[Ayush Bherwani]]></dc:creator>
            <pubDate>Sun, 12 Jul 2020 15:58:09 GMT</pubDate>
            <atom:updated>2020-07-16T23:47:08.256Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UsJs5RUbZLKl3qX4QdU2ww.png" /></figure><p>Every developer at some point in time has thought about contributing to open source, but for one reason or another, they don’t. This blog will cover everything from myth-busting to how you can make your first contribution to Flutter. Even if you are not a Flutter Developer, the general ideas will apply to contributing to any open source framework, language, or project of your choice.</p><h3>Why should you care about Open Source contributions?</h3><p>You might be thinking — why should you contribute to open source? You are a 10x Developer, what does open source have to offer you. You don’t have to contribute to open source for benefits, but if you do, open source offers a lot to drive you through.</p><h4>Mentoring</h4><p>When you contribute to a project, you get mentored from the best folks in the form of PR reviews. When your PR gets reviewed, you will get comments which can help you improve your code contributions and learn the best practices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*DcZCBWU2blAD4HlFY3Fh2A.png" /><figcaption>Andrew Brogdon, the maintainer of flutter/samples repository guiding me to write more efficient tests.</figcaption></figure><p>While contributing to <a href="https://github.com/flutter/flutter">flutter/flutter</a> and <a href="https://github.com/flutter/samples">flutter/samples</a> repository, I learned the best practices for writing test coverage in Flutter.</p><h4>Learn Something New</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3ohc1f29itSXer9ENq%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fmasterchef-junior-fox-foxtv-3ohc1f29itSXer9ENq&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2F3ohc1f29itSXer9ENq%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/4b314f34d879a1c78b345cf99d1b43e1/href">https://medium.com/media/4b314f34d879a1c78b345cf99d1b43e1/href</a></iframe><p>Contributing to your favorite project is a good way to understand the project better. You will learn how to break down the project and understand the codebase through fixing something.</p><p>When you contribute to Flutter, you will learn how your favorite widget works, as well as how to write test coverage for every change you make in the codebase. It will also give you a deeper understanding of the framework.</p><h4>Impacting Community</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FOqFHtbVDWlfekPyOY7%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fionedigital-madamenoire-mn-in-this-room-OqFHtbVDWlfekPyOY7&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2FOqFHtbVDWlfekPyOY7%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/b48becf47549377176b7b3912c8e40fe/href">https://medium.com/media/b48becf47549377176b7b3912c8e40fe/href</a></iframe><p>When you contribute to an open source project, you not only help yourself, but you also help the community around the project. The changes you make in the project will probably be used by thousands out there. You get a chance to connect with a beautiful community and give back to it.</p><h3>But, I can’t!</h3><p>Many of us think that open source contribution is not for me. Only good developers can contribute to open source. You also might have come across one of these thoughts.</p><h4>I should be a PRO to land a PR.</h4><p>You don’t have to be a PRO or a 10x developer to land a PR. If you can’t make a code contribution because you have just started, Flutter has a lot of easy fix issues which includes document changes or adding new samples to the documentation.</p><h4>I’m worried about asking help from the maintainers.</h4><p>The thing I like most about the Flutter team is that they are very generous, and they are always there to help you land a PR. Whenever I don’t know how to fix the issue or am not sure about something, I ask the maintainers, and they always help me, no matter how silly my question may seem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3VCeUf0ionUW3WIZo-3fpw.png" /><figcaption>Shi-Hao Hong who is a member of the Flutter team helping me with writing a test.</figcaption></figure><p>If you have submitted a PR and you are not confident about the approach for the solution, you can always leave comments on the code and ask maintainers to help you select a better approach.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uq_64X6ARymIg12hdHkaNg.png" /><figcaption>Me asking question on whether my approach is correct or not in my one of recent PR.</figcaption></figure><h3>Don’t believe them, it’s myth-busting time</h3><p>When it comes to Open Source contribution, you might have heard a lot of things and myths about it. Don’t worry, today we will bust few of the them.</p><h4>Myth 1 : Open Source contribution is hard.</h4><p>A lot of times, I have seen people say to me contributing to open source is hard. Only good developers can contribute to open source. It is a myth, and the one thing which I like about open source is that there is something to work on for everyone. If you are a developer, you can contribute to the codebase. If you are a technical writer, you can improve the existing documentation.</p><p>You need to take a leap of faith and comment on the issue that you would like to work on it. If you don’t know how to solve it, don’t worry, take some leads or help from the maintainers. They are always there to mentor you.</p><h4>Myth 2: Writing documentation &amp; creating issues are not open source contributions.</h4><p>Documentation plays an important role in any project. No matter how awesome it is, if it doesn’t have good documentation, people will have a hard time using it. So, even if you are contributing to improving the documentation, it’s a valuable contribution to any open source project. Improving documentation also gives you an opportunity to learn more about the API that you are documenting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DftAR0pAJm4Tk4VE7QDzWA.png" /></figure><p>While working on the PR to improve the InputDecoration.contentPadding documentation, I learned how different properties are affecting the contentPadding and got a better understanding of the widget.</p><p>Many open source projects thrive on good and valuable issues, it’s as important as sending a PR to land a fix. Finding bugs, giving feedback, and constructive criticism is important for a project to improve.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*g_cX4KVgmcCu_Imoq3fClQ.png" /><figcaption>Comment from Andrew during Flutter Day Live stream.</figcaption></figure><h3>How can you contribute to Flutter?</h3><p>There are different ways you can contribute to Flutter, you can create issues, or you can make code contributions to the Flutter framework, Flutter engine, improve the existing samples, or land the requested features for the plugins.</p><h4>Step 1</h4><p>Select a repository from the Flutter organization, which has 33 repositories as of now including the SDK, engine, samples maintained by Flutter team, a Flutter gallery, the Flutter website, as well as your favorite Flutter plugins maintained by the team. For the whole list of repositories, take a look <a href="https://github.com/flutter">here</a>.</p><h4>Step 2</h4><p>Find issues labeled as ‘easy fix’, ‘good first contribution’, ‘entertaining new contributor project’, ‘documentation’, ‘d: api docs’, or take any issue you are comfortable fixing.</p><h4>Step 3</h4><p>Talk to the maintainers if you are not sure about how to solve the issue. You can comment on the issue and take some leads. If you are not sure who is the right person to reach out, you can also join the Flutter project’s<a href="https://discord.com/invite/BS8KZyg"> discord server</a> and take some leads. Check out the different channels and their purpose <a href="https://github.com/flutter/flutter/wiki/Chat#existing-channels">here</a>. As I mentioned earlier, the Flutter team is really generous and will be there to help you out. So don’t be hesitant to ask for help.</p><h4>Step 4</h4><p>Fork the repository, clone it, and do the changes to fix the issue. Once you have fixed the issue, you might also have to write a test to ensure your changes are solid and not breaking anything.</p><p>If you are working on the flutter repository and if your change is a breaking change, you might have to write a design document for proposing the breaking change before creating a PR. How can I define my change as a breaking change? Check out flutter breaking policy <a href="https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes">here</a>.</p><p>For more detailed information on submitting a PR to flutter, you can check out the Flutter tree hygiene wiki page <a href="https://github.com/flutter/flutter/wiki/Tree-hygiene">here</a>.</p><h4>Step 5</h4><p>Wait for reviews and work on it. Once you receive an LGTM (looks good to me) comment on your PR, it will be ready to be merged🎉.</p><p>Don’t get demotivated if your PR gets closed. It’s okay and has happened to me. My PR was closed because I didn’t create an issue before sending the PR. Later, I discovered that I was working on the beta channel instead of stable, and the samples target the stable branch. Every closed PR will also help you to learn something from it. I learned the importance of creating an issue and discussing the issue with other maintainers for validation and discussing potential solutions before sending a PR.</p><h3><strong>It’s time for some tips</strong></h3><p>If you are willing to contribute to Flutter these tips will come handy.</p><h4>Don’t send a PR without creating an issue.</h4><p>It’s always a good habit to create an issue so that you can discuss the issue with other maintainers before sending a PR. You might be able to come up with a better solution together, or realize that the behavior is working as intended.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zrj6daSJeMzx9zcYo76qHA.png" /></figure><p>I did this mistake when I started contributing to the samples repository which I don’t want you to do :p</p><h4>Read the CONTRIBUTING guide or ask for TL,DR from someone.</h4><p>The mistake I made above was because I didn’t read the CONTRIBUTING guide, which clearly said that all the samples in the repository target the stable channel.</p><h4>Don’t use dartfmt in the Flutter repository.</h4><p>Never never never use dartfmt in the Flutter repository cause they don’t use it, and you will end up with a million additions and deletions. I made the same mistake in my first PR :(</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gm8OQRiW7zdxabzGAyEufg.png" /></figure><p>P.S. I wish I had read the CONTRIBUTING guide properly. For more information on the style guide used in the Flutter repository, you can check <a href="https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#formatting">here</a>.</p><h4>Tips for sending a PR</h4><ol><li>One PR for one fix, no matter how small the fix is. Consider if you land three changes in a single PR, and due to some reasons maintainers need to revert one change, your other two changes will also get reverted along with it. It also helps the team to keep track of changes and review them easily.</li><li>Be open to changes, and healthy conversation. It’s okay to get a lot of comments on the first PR, every project follows certain guidelines that you will understand in your first PR.</li><li>Don’t forget to follow up on the reviews. Sometimes it may take weeks to land a PR, have patience, and trust the process.</li></ol><blockquote>That’s it for this article, I hope this article was informative &amp; will help you make your first contribution to Flutter🎉</blockquote><blockquote>If need any help, don’t forget that Flutter team is always there to help you land a PR.</blockquote><p><em>A huge thanks to </em><a href="https://twitter.com/shihaohong"><em>Shi Hao</em></a><em> and </em><a href="https://twitter.com/redbrogdon"><em>Andrew</em></a><em> for reading the draft and providing the feedback to improve this article.</em></p><p><em>About the author: Ayush is an Undergraduate student who is passionate about developing efficient Mobile apps in both Flutter and Android. Apart from Mobile Development, his interest lies in developing Mobile DApps. You can connect with him on </em><a href="https://twitter.com/ayushbherwani"><em>Twitter</em></a><em>, </em><a href="https://linkedin.com/in/ayushbherwani"><em>LinkedIn</em></a><em>, and </em><a href="https://github.com/AyushBherwani1998"><em>GitHub</em></a><em>.</em></p><p><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=a0db68cbcd5b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/flutter-community/contributing-to-flutter-getting-started-a0db68cbcd5b">Contributing to Flutter: Getting Started</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[Booth Calling’20]]></title>
            <link>https://medium.com/@ayushbherwani/booth-calling20-e9d774ef7cce?source=rss-cdf0fd1760ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9d774ef7cce</guid>
            <category><![CDATA[community-engagement]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[community]]></category>
            <category><![CDATA[mozilla-gujarat]]></category>
            <category><![CDATA[mozilla]]></category>
            <dc:creator><![CDATA[Ayush Bherwani]]></dc:creator>
            <pubDate>Thu, 30 Apr 2020 09:35:52 GMT</pubDate>
            <atom:updated>2020-04-30T09:41:40.717Z</atom:updated>
            <content:encoded><![CDATA[<p>Since past 4 years, Mozilla Gujarat has always had a booth at FootPrints, a Techfest organized by MSU. The motive of having a booth at FootPrints was to spread awareness about Privacy and Net Neutrality among the youth. Being a community member of Mozilla Gujarat since 7–8 months, I always wanted to be at a booth and talk to people about privacy and community. This year, finally, I got a chance to volunteer at Mozilla’s booth.</p><p>The day started with setting up the booth, arranging standees and posters, thanks to <a href="https://twitter.com/gajjar_devansh">Devansh Gajjar</a>, our community member to help us with designs quickly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q30vs4WJqkLEEZjBjO4o7w.jpeg" /><figcaption>Our booth setup. The standees look beautiful, right?</figcaption></figure><p>This year at booth, we talked about User data privacy, <a href="https://support.mozilla.org/en-US/products/firefox">Firefox Browser</a>, and other Firefox products like <a href="https://send.firefox.com/">Send</a>, <a href="https://www.mozilla.org/en-US/firefox/lockwise/">Lockwise</a>, and <a href="https://monitor.firefox.com/">Monitor</a>. We also hosted different activities like WebVR game developed using <a href="https://aframe.io/">A-Frame</a> and contributing to <a href="https://voice.mozilla.org/en">Common Voice</a>.</p><p>The purpose of having a booth at Footprints was to make people aware of user privacy, what are password managers, how to keep track of data breaches, and how can they surf the internet more securely.</p><p>You might be thinking; you missed very informative conversations. Don’t worry; I’ll give a summary of every topic we discussed at the booth.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FyoJC2COHSxjIqadyZW%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FyoJC2COHSxjIqadyZW%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FyoJC2COHSxjIqadyZW%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/726db25a110c269982f49b802c414227/href">https://medium.com/media/726db25a110c269982f49b802c414227/href</a></iframe><h3>Summary</h3><p>It’s 2020, and the majority of people are not aware of how their data is being collected, analyzed, stored or sold to advertising agencies when using their apps, and websites. Here, the term data refers to all the information that can identify you.</p><p>Most of the people tap on ‘I Agree to T&amp;Cs’ and hardly give it read, which is then being exploited by the organizations. One of the recent cases was about FaceApp, where people can upload their photo and let the app takes a convincing guess at what you’ll look like when you’re old. The FaceApp’s T&amp;C states that, they have permission to sell, modify or do anything with their data which also included their facial images.</p><p>Said that it’s essential to read T&amp;C, you can use this <a href="https://addons.mozilla.org/en-US/firefox/addon/terms-of-service-didnt-read/">Terms of Service; Didn’t Read</a> extension for Firefox which will inform you instantly about website’s terms &amp; privacy policies, with ratings and summaries from the <a href="https://tosdr.org/">TOSDR</a> initiative</p><p><strong>Password Managers</strong></p><p>According to the reports of 2018, at least 59% of people use same password everywhere which is the major reason why password reuse attacks are successful. In password reuse attacks the hacker breaks into a website, steal user’s credentials and try to login to other sites using the same credentials.</p><p>Using a different password for every login is an integral part of the overall security of accounts and user privacy. Despite using different password every time, it’s also essential to use a strong password. A secure password may have a minimum of 12 characters, includes number, symbols, uppercase letter and lowercase letter. If you are more curious about how to define a secure password, you can watch this <a href="https://www.youtube.com/watch?v=yzGzB-yYKcc">video</a> by Edward Snowden.</p><p>You might be thinking that’s great, but how can I remember so many different passwords.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F6gDSyjaOPwZ4A%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F6gDSyjaOPwZ4A%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F6gDSyjaOPwZ4A%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/1c14e8c8763091c1a2c3336ff125b7b3/href">https://medium.com/media/1c14e8c8763091c1a2c3336ff125b7b3/href</a></iframe><p>That’s where Password Managers comes in the play. Password Managers are nothing but the programs which can help you to choose a strong password and help you to remember them with other personal details. One of such password manager is <a href="https://www.mozilla.org/en-US/firefox/lockwise/">Firefox Lockwise,</a> which provides 256 bit encryption while syncing your passwords and you can access them anywhere using Firefox account.</p><p><strong>Data Breaches</strong></p><p>A data breach is a security incident in which information is accessed without authorization. Most of the recent data breaches are from Zoom and Facebook. Researchers found and bought more than 500,000 Zoom passwords on the dark web for less than a cent each and Hackers sold 267 Million user profiles for $540 on dark web.</p><p>You might be thinking, how can you secure yourself from data breaches? Reality can often be disappointing. No one is safe from hackers, and everyone can get hacked. But timely taken measures can help you be more secure even if you have been affected by a data breach.</p><p>Firefox Monitor helps you to monitor the ongoing data breaches against multiple email-address and send you an alert if your information is found in new data breach so you can change the passwords and take the necessary steps.</p><p><strong>Firefox Send</strong></p><p>Have you ever thought about sharing your files securely, and why should you care?</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3orifeExnTaomwKvjq%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3orifeExnTaomwKvjq%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F3orifeExnTaomwKvjq%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="328" frameborder="0" scrolling="no"><a href="https://medium.com/media/dd1a022e8d5c35fdeef59be4aa2bb346/href">https://medium.com/media/dd1a022e8d5c35fdeef59be4aa2bb346/href</a></iframe><p>File Sharing is increasing exponentially, and the way we share the files or the apps we use involves security risks. It consists of the risk of being hacked, and loss or exposure of sensitive information.</p><p>Firefox Send is a product of Mozilla which allows you to share files with end to end encryption. It also allows you to set an expire for a download link after a certain number of downloads or amount of time and to add an extra layer of security; you can password-protect them.</p><p>Apart from these, we also talked about 2FA, browsers, activity tracking, search engines and voice assistants.</p><p>We also had few swags for the people who were actively participating in and completing the challenges. We empowered more than 100 people of different age range from the youngest participant being a 12 years old kid to host a more than 60 years old professor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AqWjoG3_T1LG7T_2uJKwYw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NwTREI4nyPzkeI8xDa3gdw.jpeg" /></figure><p>That’s it for this article. If you want to know more, you can connect with us at <a href="https://twitter.com/mozguj">Mozilla Gujara</a>t. If you liked this article don’t forget to appreciate by a 50 claps 😃</p><p>If you have any suggestions, feedback, feel free to comment below or you can connect with me on</p><ul><li><a href="https://twitter.com/ayushbherwani">Ayush Bherwani</a></li><li><a href="https://www.linkedin.com/in/ayushbherwani/">Ayush B. - Flutter Developer Intern - AV DEVS solutions | LinkedIn</a></li></ul><p>Checkout my recent articles</p><ul><li><a href="https://medium.com/analytics-vidhya/machine-learning-for-flutter-developers-db15c23e3a60">Machine Learning in Flutter</a></li><li><a href="https://medium.com/@ayushbherwani/notification-badge-in-flutter-c776a6194936">Notification Badge in Flutter</a></li><li><a href="https://medium.com/@ayushbherwani/flutter-credit-card-animation-ad43a15a7491">Flutter Credit Card Animation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9d774ef7cce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developing Mobile DApps Part 1]]></title>
            <link>https://medium.com/coinmonks/developing-mobile-dapps-part-1-9374812814ef?source=rss-cdf0fd1760ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/9374812814ef</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[dapps]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Ayush Bherwani]]></dc:creator>
            <pubDate>Wed, 12 Feb 2020 04:02:30 GMT</pubDate>
            <atom:updated>2020-08-25T13:54:27.890Z</atom:updated>
            <content:encoded><![CDATA[<h3>Developing Mobile Dapps Part 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-PgC6M4p1MuHFZ3GRWddGg.png" /></figure><p>Blockchain has been a hype word for a long time, but often we find it challenging to implement real-world applications. For me, learning Blockchain wasn’t that easy. I had to go through a lot of blogs and Stack Exchange answers to understand the concepts. Don’t worry, in this series of articles we are going to learn how to build Mobile Dapps with Flutter. I’ll attempt to make it as uncomplicated as possible and easy to grasp.</p><p>Before we move on to implement Dapps, we must know the basics of Blockchain and Ethereum. So, in this article, we will cover the basics of Blockchain and other terminologies associated with it.</p><h4>Blockchain</h4><p>Blockchain in simple terms is a decentralized distributed ledger. As the word suggests, it’s just a collection of blocks linked together, to record the transactions in such a way that it’s not possible to modify these transactions. This characteristic of Blockchain is also known as immutability. The immutability of transactions makes Blockchain a trustworthy solution and decentralized distributed ledger brings the transparency in the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*cdgc92Vwm9m86Diviu_24w.gif" /><figcaption>Collection of blocks linked together.</figcaption></figure><p>Hey, that’s great but what is a block and how does Blockchain achieve immutability?</p><h4><strong>What is a block?</strong></h4><p>To make it simple to understand, a block consist of three things, hash of previous block, transactions, and hash of the current block also know as root hash of Merkle tree. A single block can contain more than one transactions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*TQLRYfdzDosO5AYo6toj5A.jpeg" /><figcaption>Representations of blocks in blockchain.</figcaption></figure><p>Apart from these three things a block also consist of nonce value, timestamp, difficulty target but let’s not dig into this because it’s a very vast topic and let’s leave it for some another day.</p><h4>Why Immutable?</h4><p>Before we discuss how Blockchain achieves immutability, let’s discuss what is a cryptographic hashing.</p><p>A cryptographic hashing is a one-way process of generating a series of characters which is usually known as a hash. A hash function takes an input data and produces a corresponding hash. Every time you pass the same input data to the function it generates the same hash. This property of hashing function makes it deterministic<strong>. </strong>In the context of Blockchain, it uses Secure Hashing Algorithm 256 function a.k.a SHA-256 to generate hash.</p><p>SHA-256 is a cryptographic hash function which generates a fixed-sized 256-bit output which is almost unique, no matter how long the given input data is. You can pass a whole Wikipedia, and it will still return a unique 256-bit hash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s7iTwJ_B1kxmY9ZHs554ww.png" /><figcaption>32 character Hash of a long paragraph from Wikipedia</figcaption></figure><p>A single character variation in the input data results in a significant difference in the generated hash. It is a desirable property of cryptographic functions known as Avalanche effect. In the below images, you can see the difference between generated hash for the word “Blockchain” and “blockchain”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*LU_1oOBqygdxA1I0Xhkxzw.png" /><figcaption>32 character Hash for Blockchain</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*KGMtOz_gvv0Ks-8xnWffJg.png" /><figcaption>32 character Hash for blockchain</figcaption></figure><p>SHA-256 also has a property known as Pre-Image Resistance which means you can generate a hash from the given input data, but you can not find the input data from the given hash. The only way that you can find the original input is by using the brute-force method. In the brute-force method, you pick up a random input, hash it and then compare the output with the target hash and repeat until you find a match. It’s infeasible to find the original input data because it will take you 2¹²⁸ attempts to pick the correct random input unless you are a magician.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3o84U6421OOWegpQhq%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3o84U6421OOWegpQhq%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F3o84U6421OOWegpQhq%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="245" frameborder="0" scrolling="no"><a href="https://medium.com/media/5923d99a20c40852ac87a37ceddaddc7/href">https://medium.com/media/5923d99a20c40852ac87a37ceddaddc7/href</a></iframe><p>Now that we have understood how hashing works, it’s time to discuss how Blockchain achieves immutability. The hash of the previous block is contained in the hash of the new block, the blocks of the Blockchain all build on each other. Without a previous hash, there would be no connection. So due to Avalanche effect, if we change any one piece of this information in the block, the hash is going to change, and it will break the chain.</p><h4>Mining</h4><p>If you have heard about Blockchain before, you must have come across the word mining. Mining is an expensive computation calculation that is performed by a miner to generate a particular hash for the block and validate the legitimacy of the transactions in the block. The expensive computation that is performed by the miner is known as Proof of Work which is a trustless and distributed consensus algorithm used by Blockchain.</p><p>Every block has a particular difficulty level which defines a threshold level for hash. Every time miner generates a new hash, it is compared with the difficulty threshold. The process is repeated until the generated hash is less than the threshold.</p><p>You might be wondering since we have the same transactions inside the block how can we generate a new hash every time. Yes, you are correct we cannot generate a new hash with the same transaction list due to deterministic property of the cryptographic function. But if you remember, we discussed that block also consist of nonce value, timestamp, and difficulty target. A nonce is an arbitrary number that is added with the hash of the block. If the hash is not less than the difficulty threshold, then the nonce is changed, and this keeps on repeating a million times until finally, it is less than the given threshold.</p><p>Okay, that’s great, but why do we change the difficulty threshold? Hmm, it’s an interesting question. So, whenever a new block is created, it’s propagated across the network so that every block has a record of this new transaction in the ledger. In theory, it takes almost 10 minutes for a new block to propagated across the network in Bitcoin and 10–19 minutes in Ethereum. The hash will be easily generated if the difficulty threshold is less, and it might be the case that every block does not have the updated ledger, which may cause inconsistency in the network. So, to maintain an average time of block creation to 10 minutes, the difficulty threshold is changed after every 2016 blocks in Bitcoin.</p><p>That’s it for this article. In the next part, we will discuss about Ethereum and concepts related to it. If you liked this article don’t forget to appreciate by a 50 claps :p</p><p>If you have any suggestions, feedback or doubts, feel free to comment below or you can connect with me on</p><ul><li><a href="https://twitter.com/ayushbherwani">Ayush Bherwani</a></li><li><a href="https://www.linkedin.com/in/ayushbherwani/">Ayush B. - Flutter Developer Intern - AV DEVS solutions | LinkedIn</a></li></ul><p>Checkout my recent articles</p><ul><li><a href="https://medium.com/analytics-vidhya/machine-learning-for-flutter-developers-db15c23e3a60">Machine Learning in Flutter</a></li><li><a href="https://medium.com/@ayushbherwani/notification-badge-in-flutter-c776a6194936">Notification Badge in Flutter</a></li><li><a href="https://medium.com/@ayushbherwani/flutter-credit-card-animation-ad43a15a7491">Flutter Credit Card Animation</a></li></ul><blockquote><a href="https://coincodecap.com/?utm_source=coinmonks">Get Best Software Deals Directly In Your Inbox</a></blockquote><figure><a href="https://coincodecap.com/?utm_source=coinmonks"><img alt="" src="https://cdn-images-1.medium.com/max/584/0*OJ-qb5G6i863msBB.png" /></a></figure><figure><a href="https://coincodecap.com/"><img alt="" src="https://cdn-images-1.medium.com/max/540/1*5fZu_SfnNF6m_BGbXlsl-A@2x.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9374812814ef" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coinmonks/developing-mobile-dapps-part-1-9374812814ef">Developing Mobile DApps Part 1</a> was originally published in <a href="https://medium.com/coinmonks">Coinmonks</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[They made me feel like a boomer]]></title>
            <link>https://medium.com/@ayushbherwani/they-made-me-feel-like-a-boomer-663381468853?source=rss-cdf0fd1760ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/663381468853</guid>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[mozilla]]></category>
            <category><![CDATA[mlh]]></category>
            <category><![CDATA[local-hack-day]]></category>
            <dc:creator><![CDATA[Ayush Bherwani]]></dc:creator>
            <pubDate>Tue, 10 Dec 2019 19:05:43 GMT</pubDate>
            <atom:updated>2019-12-10T19:05:43.467Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*746W4wkykp3U-kq7cH2r9Q.jpeg" /><figcaption>OK BOOMER!!</figcaption></figure><p>Let me ask you a question, what did you use to do when you were in high school? I guess, no one used to participate in Hackathons, develop websites, and run a YouTube channel, right? Me neither, I used to watch Oggy and Cockroaches.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F52F9ssEmLkLXEkVoke%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Foggy-and-the-cockroaches-cockroaches-oggy-and-the-52F9ssEmLkLXEkVoke&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F52F9ssEmLkLXEkVoke%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/5fa745f7fea203bcd31e789a99d32dac/href">https://medium.com/media/5fa745f7fea203bcd31e789a99d32dac/href</a></iframe><p>What if I say I met high school students who participate in hackathons, develop websites, and run a YouTube channel?</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F4tRr2ULBwiIA8%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fsurprised-cats-shocked-cat-4tRr2ULBwiIA8&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F4tRr2ULBwiIA8%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/ffde54b5f2d25c004f9ad38132cc68f5/href">https://medium.com/media/ffde54b5f2d25c004f9ad38132cc68f5/href</a></iframe><p>In this article, I’m gonna share about high school students who came to the MLH Local Hack Day and made me feel like a boomer<strong>. </strong>They not only participated in the hackathon but also secured 3rd position.</p><blockquote><strong>MLH Local Hack Day </strong>is a series of simultaneous global events designed to spark a passion for technology by organizing a learn day, a hack day, and a demo day in your local community. <a href="https://localhackday.mlh.io/">Learn more</a></blockquote><h4>Local Hack Day</h4><p>The Local Hack Day was by <a href="https://twitter.com/mozneurons"><strong>MozNeurons</strong></a>, <a href="https://twitter.com/dscsvit"><strong>DSC SVIT</strong></a>, and <a href="https://twitter.com/mozguj"><strong>Mozilla Gujarat</strong></a><strong> </strong>on 07th Dec 2019 at <a href="https://www.linkedin.com/company/avdevs/"><strong>AV DEVS solutions Pvt. Ltd</strong></a>. This was my first hackathon as a mentor and it was a great experience to mentor such brilliant minds who were trying to solve problems using technology. I loved the fact that no participant was afraid to try something new and were ready to learn new things.</p><p>Among all the college participants we also had three high school students who participated in the hackathon for the first time. Everyone was so happy to see these young minds determined to solve the problems using technology.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p0pO-8crDlUa0R0sSSr0tw.jpeg" /><figcaption>Aayush(one of the 10th grade student) working on the Hack Day Project</figcaption></figure><h4>Ek Clean India</h4><p><a href="http://www.ekcleanindia.com/">Ek Clean India</a> is the solution developed by the high school Students during the hackathon which is an online platform that tries to ease the process of registering a complaint regarding cleanness in your locality, suggestions or feedback from anywhere in the country through emails and WhatsApp which are handled by bots. The complaints, suggestions, and feedbacks are collected and then forwarded to the respective authority so they can take the relevant action. One can also register themselves as a Volunteer to support their mission to Make India Cleaner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X4ghowFlhKDhBnrKv9dy9w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W3B56sDaCBjkPymM_CCnEg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KcFiHUQvFld24QuH84gnQg.png" /><figcaption>Screenshots of Ek Clean India website</figcaption></figure><p>I was mind blown to see such amount of tech exposure at such a small age when I started to discuss how they are managing things for Ek Clean India and tech stack they are working on. Aayush Shah, one of the three participants also has a <a href="https://www.youtube.com/channel/UCIEgpWCPxZ80PM2oxnek7cA">YouTube Channel</a> with more than 1M views and 3.5K subscribers. He was recently gifted the mic for recording by YouTube.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4zU0pSYaTpByS0_yoAMrZQ.jpeg" /><figcaption>Me, mentoring and solving their issues</figcaption></figure><h4>Testimony</h4><blockquote><strong>How did they come across MLH local hack day?</strong></blockquote><p>They came to know about local hack day through the brother of one of the participants.</p><blockquote><strong>Their Experience</strong></blockquote><p>This was their first hackathon and they didn’t know what to prepare but this didn’t stop them from exploring new things. It was a great learning experience for them and they learned many new things such as git, Azure. They liked the one to one mentoring and said they never had such mentoring before. They enjoyed the Azure workshop which was well planned and very informative. They specially enjoyed the food and venue. Securing the 3rd position has given the boost to do more and participate in more hackathons.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_M4P9SXXWCpjVDTd7NkkgQ.jpeg" /><figcaption>Nandan taking the Azure workshop</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NCr8-B3bEQAUbSsJrKux3w.jpeg" /><figcaption>Subway for Lunch</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vlMwKKVJ5mkwy3EFW0n22A.jpeg" /><figcaption>AV DEVS solutions, the venue for Local Hack Day</figcaption></figure><blockquote><strong>Their views about Mozilla Gujarat Community</strong></blockquote><p>They liked the fact that we are not like other communities that are monotonous after the event. They were happy to see that we organize open events where everyone is welcomed and they would love to attend future events.</p><p>The Local Hack day ended on the high note and I would like to congratulate all the winners, participants, and organizers to make this event worth remembering.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0ZO28vl0JEdW2WKQ6Ln8rQ.jpeg" /><figcaption>That’s a wrap at Local Hack Day.</figcaption></figure><h4>About Me</h4><p>I’m a Mobile Application Developer who loves to explore deep sea of Flutter widgets. If you liked this article don’t forget to appreciate by a 50 claps :p</p><p>If you have any suggestions feel free to comment below or you can connect with me on</p><ul><li><a href="https://twitter.com/ayushbherwani">Ayush Bherwani</a></li><li><a href="https://www.linkedin.com/in/ayush-bherwani-9529b3158/">Ayush Bherwani - PARUL INSTITUTE OF ENGG. AND TECH., LIMDA, VAGHODIA 037 - Vadodara, Gujarat, India | LinkedIn</a></li></ul><p><strong>Check out my recent articles</strong></p><ul><li><a href="https://medium.com/@ayushbherwani/machine-learning-for-flutter-developers-db15c23e3a60">Machine Learning for Flutter Developers</a></li><li><a href="https://medium.com/@ayushbherwani/flutter-credit-card-animation-ad43a15a7491">Flutter Credit Card Animation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=663381468853" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning in Flutter]]></title>
            <link>https://medium.com/analytics-vidhya/machine-learning-for-flutter-developers-db15c23e3a60?source=rss-cdf0fd1760ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/db15c23e3a60</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Ayush Bherwani]]></dc:creator>
            <pubDate>Fri, 06 Dec 2019 13:11:56 GMT</pubDate>
            <atom:updated>2020-02-16T05:41:55.048Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*8yZOanlS3cYbUlzMIOfaKA.png" /><figcaption>Flutter + Tflite is a complete love story</figcaption></figure><p>People always hear others talking about machine learning but only have a fuzzy idea of what that means. Often they find it difficult to implement machine learning models but don’t worry,<strong> </strong>Teachable Machine<strong> </strong>got you covered.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FKfliFczhGjYoPHmWE9%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fimpeachment-inquiry-steve-castor-KfliFczhGjYoPHmWE9&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FKfliFczhGjYoPHmWE9%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="371" frameborder="0" scrolling="no"><a href="https://medium.com/media/d015c7b01f8d747057521cb5524e2a02/href">https://medium.com/media/d015c7b01f8d747057521cb5524e2a02/href</a></iframe><blockquote><strong>Teachable Machine </strong>is a web-based tool by Google aiming to make AI easier for everyone. You can use Teachable Machine to recognize images, sounds or poses.</blockquote><p>So in this article, I’m gonna share how you can create your machine learning model using Teachable Machine and integrate in Flutter.</p><p><strong>Let’s have a quick look at what we are gonna build today</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*TM6UQXYieW7CquEwn7TkgQ.png" /><figcaption>Flutter Application to classify images of dogs and cats</figcaption></figure><p>First go to <a href="https://teachablemachine.withgoogle.com/train"><strong><em>Teachable Machine</em></strong></a><strong><em> </em></strong>and open Image Project. To get started with training the model we will need to create two classes, namely “Dog” and “Cat” and upload training images for model to learn from. You can download the dataset from <a href="https://www.kaggle.com/tongpython/cat-and-dog">here</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OaZLxYYk58ulzAiQleAyng.png" /><figcaption>Snap of Teachable Machine Learning Image Project</figcaption></figure><p>Change the Class 1 name to Cat and click on the upload to upload the training images for the cats.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_BYyR8t5hbiNPlXfbNmijg.png" /><figcaption>Click on the upload and choose images from your folder.</figcaption></figure><p>Now do the same for the Class 2, change the Class 2 to Dog and upload the training images for dogs. After uploading the training images, click on the Train Model<strong> </strong>to start the training.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I-bb8g44Bmxv4hRoRJ9g3w.png" /><figcaption>Model started Training</figcaption></figure><p>It’s gonna take time if you have uploaded more number of training images, so sit back and wait for model to get train.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FbrHaCdJqCXijm%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fhappy-spongebob-squarepants-happiness-brHaCdJqCXijm&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FbrHaCdJqCXijm%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="315" frameborder="0" scrolling="no"><a href="https://medium.com/media/abaf0b1171de6dd38ab85decac3e70d1/href">https://medium.com/media/abaf0b1171de6dd38ab85decac3e70d1/href</a></iframe><p>After your model is trained, click on the export model and download the Tensorflow Lite Floating Point Model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GmND8E8cZ3SgmVdoIAfktA.png" /><figcaption>Exporting Tensorflow Lite Floating Point Model</figcaption></figure><h4>Now it’s time to integrate the .tflite mode in Flutter</h4><p>Create a new Flutter Project and add tflite and image_picker as a dependency in your pubspec.yaml file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*DkNWiqEH7Uab5Dhz5WOnFg.png" /><figcaption>pubspec.yaml</figcaption></figure><p>In android/app/build.gradle, add the following setting in android block.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/254/1*XLlgkfmxhXnkZf2JRcHmdA.png" /><figcaption>android/app/build.gradle</figcaption></figure><p>Create a assets folder and place your labels.txt file and model_unquant.tflite file in assets folder. In pubspec.yaml do the following changes to specify files that should be included with the app</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/298/1*80g18KjVCOaxTTUXf931Bw.png" /><figcaption>pubspec.yaml</figcaption></figure><p>In main.dart include import &#39;package:tflite/tflite.dart&#39;; &amp; import ‘package:image_picker/image_picker.dart’;</p><p>The image_picker plugin will be used for picking images from the image library, and taking new pictures with the camera.</p><p>After importing libraries, it’s time to load your .tflite model in main.dart .We will be using a bool variable _loading to show CircularProgressIndicator while the model is loading.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/762fb36cb187e7b3fe155e090b016d12/href">https://medium.com/media/762fb36cb187e7b3fe155e090b016d12/href</a></iframe><p>Now, we will use image_picker plugin to pick an image from the Gallery whenever the FloatingActionButton is pressed. The image we pick will be passed as an argument to classifyImage. We will use Tflite.runModelOnImage to classify images of dogs and cats.</p><p>Tflite.runModelOnImage returns Future&lt;List&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*OdE7yU05mWpJaf9OUQN7pQ.png" /><figcaption>Output of Tflite.runModelOnImage</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/87c9c03d64a7766eea5a851f42eb6d82/href">https://medium.com/media/87c9c03d64a7766eea5a851f42eb6d82/href</a></iframe><p>Now it’s time to display the image we picked and the classification results on the screen.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6412980e0591b79e1717a6ab9c95c59e/href">https://medium.com/media/6412980e0591b79e1717a6ab9c95c59e/href</a></iframe><p>It’s time to run the Flutter Application. Run flutter run command in terminal to run your app.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FbEVKYB487Lqxy%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FbEVKYB487Lqxy&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FbEVKYB487Lqxy%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="239" frameborder="0" scrolling="no"><a href="https://medium.com/media/7f8f5776de718354f613abef824290c0/href">https://medium.com/media/7f8f5776de718354f613abef824290c0/href</a></iframe><p>Check out the <a href="https://github.com/AyushBherwani1998/flutter_teachable_ml/blob/master/lib/main.dart">GitHub Repository</a> for the source code of above application.</p><p>Hey Readers, I’m a Mobile Application Developer who loves to explore deep sea of Flutter widgets. If you liked this article and found this helpful don’t forget to appreciate by a 50 claps :p</p><p>If you have any questions or suggestions feel free to comment below or you can connect with me on</p><ul><li><a href="https://twitter.com/ayushbherwani">Ayush Bherwani</a></li><li><a href="https://www.linkedin.com/in/ayush-bherwani-9529b3158/">Ayush Bherwani - PARUL INSTITUTE OF ENGG. AND TECH., LIMDA, VAGHODIA 037 - Vadodara, Gujarat, India | LinkedIn</a></li></ul><p>Checkout my recent articles</p><ul><li><a href="https://medium.com/coinmonks/developing-mobile-dapps-part-1-9374812814ef">Developing Mobile DApps Part 1</a></li><li><a href="https://medium.com/@ayushbherwani/notification-badge-in-flutter-c776a6194936">Notification Badge in Flutter</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db15c23e3a60" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/machine-learning-for-flutter-developers-db15c23e3a60">Machine Learning in Flutter</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Credit Card Animation]]></title>
            <link>https://medium.com/@ayushbherwani/flutter-credit-card-animation-ad43a15a7491?source=rss-cdf0fd1760ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad43a15a7491</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[animation]]></category>
            <dc:creator><![CDATA[Ayush Bherwani]]></dc:creator>
            <pubDate>Mon, 12 Aug 2019 07:57:50 GMT</pubDate>
            <atom:updated>2020-02-16T05:40:09.548Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VnWnqVVGNXFKZctCoB7sFg.png" /></figure><p>Animations are a useful supplement to great UX design and provides a layer of delight, fun, reassurance, and meaning to interactions. Flutter provides a wide range of animations from animated widget to custom animations.</p><p><strong>Lets have a look at what you gonna learn today</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vZ8B-EDf7ep0WJvTmYphlA.gif" /><figcaption>Abracadabra!! It’s magic</figcaption></figure><p>To achieve the above animation we will use AnimatedPositioned, AnimatedContainer and f<a href="https://pub.dev/packages/flutter_credit_card">lutter_credit_card</a> package for Credit Card widget.</p><p><strong>Wooh !! Hold a minute,that’s it?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*wc22UXuiFzRRT-iX2VtJYw.gif" /></figure><h3>Let’s get started</h3><p>AnimatedPositioned will automatically transits the child’s position whenever the given values changes.</p><p>Whereas AnimatedContainer will automatically transits the child’s properties from old values to new values.</p><p>To use AnimatedPositioned we must have Stack as the parent of AnimatedPositioned</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7494aaec4c8f2c8b016299cc32e9d140/href">https://medium.com/media/7494aaec4c8f2c8b016299cc32e9d140/href</a></iframe><p>In the above code we are creating a FloatingActionButton which changes the values of AnimatedContainer and topof AnimatedPositioned. The initial value of the height and width for the AnimatedContainer is 0, and top position of AnimatedContainer is 700.</p><p>On clicking the FloatingActionButton we are changing the containerHeight , containerWidth and topPosition which will change the values of AnimatedContainer and AnimatedPositioned . This will provide animation from old state to new state.</p><p>We are setting the animation duration for AnimatedPositioned and AnimatedContainer by using duration property.</p><p>The curve property allow us to change the rate of animation. The the bounce effect in the above GIF was due to Curves.elasticOut . Flutter provides a collection of common animation curves . <a href="https://api.flutter.dev/flutter/animation/Curves-class.html"><strong>Click here</strong></a> to know more.</p><p><strong>That’s great, but where is the Credit Card?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/255/1*9CpbEUM04xaygNOfyp0kcA.gif" /><figcaption>We are almost there!!</figcaption></figure><p>Import the package flutter_credit_card which allows you to easily implement the Credit card’s UI easily with the Card detection.</p><p>First thing first ! Let’s add dependency to pubspec.yaml</p><pre>dependencies:<br>    flutter_credit_card: 0.1.1</pre><p>Create a variable showBackOfCard type bool to control the credit card view.</p><pre>CreditCardWidget(<br>        cardNumber: <strong>&quot;5124 8084 4590 3194&quot;</strong>,<br>        expiryDate: <strong>&quot;01/25&quot;</strong>, <br>        cardHolderName: <strong>&quot;Ayush Bherwani&quot;</strong>,<br>        cvvCode: <strong>&quot;565&quot;</strong>,<br>        showBackView: showBackOfCard, //show cvv when true<br>        cardbgColor: Colors.<em>white</em>,<br>        height: 175,<br>        textStyle: TextStyle(color: Colors.<em>black</em>),<br>        animationDuration: Duration(seconds: 1),    <br>),</pre><p>The animationDuration is the time taken to animate to the back view of the card to show CVV code.</p><p>To change the value of showBackOfCard wrap CreditCardWidget inside GestureDetector . GestureDetector will be child of AnimatedContainer</p><pre>GestureDetector(<br>  onTap: () {<br>    setState(() {<br>      <strong>showBackOfCard </strong>= !<strong>showBackOfCard</strong>;<br>    });<br>  },<br>  child: //CreditCardWidget<br>)</pre><p><strong>Time to test the app</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/1*z4hrzVsCjN6U1udjTeS7qA.gif" /></figure><p>Run flutter run command in terminal to run your app.</p><p>You can find the source code below</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4dfa165d1b3d8190671adcd8d934a605/href">https://medium.com/media/4dfa165d1b3d8190671adcd8d934a605/href</a></iframe><p>Hey Readers, I’m a Mobile Application Developer who loves to explore deep sea of Flutter widgets. If you liked this article and found this helpful don’t forget to appreciate by a 50 claps :p</p><p>If you have any questions or suggestions feel free to comment below or you can connect with me on</p><ul><li><a href="https://twitter.com/ayushbherwani">Ayush Bherwani</a></li><li><a href="https://www.linkedin.com/in/ayushbherwani/">Ayush B. - Flutter Developer Intern - AV DEVS solutions | LinkedIn</a></li></ul><p>Checkout my Recent Articles</p><ul><li><a href="https://medium.com/@ayushbherwani/notification-badge-in-flutter-c776a6194936">Notification Badge in Flutter</a></li><li><a href="https://medium.com/coinmonks/developing-mobile-dapps-part-1-9374812814ef">Developing Mobile DApps Part 1</a></li><li><a href="https://medium.com/analytics-vidhya/machine-learning-for-flutter-developers-db15c23e3a60">Machine Learning in Flutter</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad43a15a7491" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Notification Badge in Flutter]]></title>
            <link>https://medium.com/@ayushbherwani/notification-badge-in-flutter-c776a6194936?source=rss-cdf0fd1760ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/c776a6194936</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[notifications]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[flutter-widget]]></category>
            <dc:creator><![CDATA[Ayush Bherwani]]></dc:creator>
            <pubDate>Sat, 02 Mar 2019 09:44:14 GMT</pubDate>
            <atom:updated>2020-02-16T05:38:17.555Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PblQquEXxZ6U1BmBNlEprA.jpeg" /></figure><p>This is my first article on Medium and it’s about Flutter. If you are reading this it probably means that you must have heard about Flutter SDK, Well for those who are not aware of it</p><blockquote><strong>Flutter</strong> is Google’s new SDK which allows you to build beautiful native apps on iOS and Android from a single codebase. To know more about Flutter <a href="https://flutter.dev/"><strong>click here</strong></a></blockquote><p>So in this article, I’m gonna share how you can achieve a <em>Notification Badge</em> in <em>Flutter</em> without using packages.</p><h4><strong>Here is a quick look at what we going achieve today</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hY2xZPHrC8TLrz7IhpGOog.jpeg" /><figcaption>Notification Badge</figcaption></figure><h4>Basic Idea behind the notification badge</h4><p>Using <a href="https://docs.flutter.io/flutter/widgets/Stack-class.html"><strong>Stack</strong></a><strong> </strong>and <a href="https://docs.flutter.io/flutter/widgets/Positioned-class.html"><strong>Positioned</strong></a><strong> </strong>widgets we can stack the Text widget over the IconButton to show the notification badge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*6Kj4loEwiySpkso0KgBeqQ.png" /><figcaption>Basic Idea to achieve the notification badge</figcaption></figure><h4>Time to get hands dirty</h4><p>Create a new Flutter Project and delete everything in <strong>main.dart</strong>. Import the package and write the basic code which is required. Remove the debug banner in the app by assigning<em> </em>false<em> </em>to debugShowCheckedModeBanner</p><pre>debugShowCheckedModeBanner: false</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/57f34c5a33d638127fbed7787f306e96/href">https://medium.com/media/57f34c5a33d638127fbed7787f306e96/href</a></iframe><p>Now, create a classMyApp which extends StatefulWidget<strong> </strong>and override the createState(). createState()should return an object of State class. So, Create a new class _MyApp which extends the State&lt;MyApp&gt; and override the build() method. To learn more about StatefulWidget <a href="https://flutter.dev/docs/development/ui/interactive"><strong>click here</strong></a><strong>.</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b0f928c138368116637844256073df3c/href">https://medium.com/media/b0f928c138368116637844256073df3c/href</a></iframe><p>Now create an instance variable of the type int for_MyApp and name it counter . The variablecounter will keep track of notification count. Thebuild() method should return a Scaffold widget. The purpose of returning Scaffold from a StatefulWidget is to change the count of notifications in notification badge.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2cc77ffe3a6e9d32259762e7aba1d8d7/href">https://medium.com/media/2cc77ffe3a6e9d32259762e7aba1d8d7/href</a></iframe><p>In the above code snippet, we have created an App Bar and a Floating Action Button. In the onPressed parameter of the FloatingActionButton we are incrementing the value of counter inside the setState() .</p><p>Let’s use Stack widget inside &lt;Widget&gt;[] which is a list of widgets which is given to action parameter of AppBar. The Stack widget has a parameter name children which accepts the list of widgets &lt;Widget&gt;[]. Create an IconButton inside Stack and use Positioned widget to set the child of Positionedwidget which will a be Text widget over the IconButton. The Text widget will be used to show the count of notifications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*V05-Jj2PMn2OSCMsT0upQQ.jpeg" /><figcaption>Image to show basic idea of parent and children hierarchy for Stack. Note we will also use Container and Center widgets to achieve the notification badge</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c80fab3bc3b8c1b0ab8bda0003e5fadd/href">https://medium.com/media/c80fab3bc3b8c1b0ab8bda0003e5fadd/href</a></iframe><p>In the above code, we are checking whether the value of counter is greater than 0 to not. If the value of counter is greater than 0, we will show the notification badge else will show an empty Container. We are also setting counter to 0 when IconButton is pressed to remove the notifications.</p><h4>Final Result</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgfycat.com%2Fifr%2Fconsciousshallowiberianmole&amp;url=https%3A%2F%2Fgfycat.com%2Fconsciousshallowiberianmole&amp;image=https%3A%2F%2Fthumbs.gfycat.com%2FConsciousShallowIberianmole-size_restricted.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=gfycat" width="720" height="1280" frameborder="0" scrolling="no"><a href="https://medium.com/media/f22aea2307b74a92e356a0b11f5ef089/href">https://medium.com/media/f22aea2307b74a92e356a0b11f5ef089/href</a></iframe><p><a href="https://github.com/AyushBherwani1998/Flutter-Notification-Badge/blob/master/notification_badge_flutter/lib/main.dart"><strong>Click here</strong></a> to view Source Code</p><p>Hey Readers, I’m a Mobile Application Developer who loves to explore deep sea of Flutter widgets. If you liked this article and found this helpful don’t forget to appreciate by a 50 claps :p</p><p>If you have any questions or suggestions feel free to comment below or you can connect with me on</p><ul><li><a href="https://twitter.com/ayushbherwani">Ayush Bherwani</a></li><li><a href="https://www.linkedin.com/in/ayushbherwani/">Ayush B. - Flutter Developer Intern - AV DEVS solutions | LinkedIn</a></li></ul><p>Checkout my Recent Articles</p><ul><li><a href="https://medium.com/analytics-vidhya/machine-learning-for-flutter-developers-db15c23e3a60">Machine Learning in Flutter</a></li><li><a href="https://medium.com/coinmonks/developing-mobile-dapps-part-1-9374812814ef">Developing Mobile DApps Part 1</a></li><li><a href="https://medium.com/@ayushbherwani/flutter-credit-card-animation-ad43a15a7491">Flutter Credit Card Animation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c776a6194936" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>