<?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 AkshatApp on Medium]]></title>
        <description><![CDATA[Stories by AkshatApp on Medium]]></description>
        <link>https://medium.com/@akshatapp?source=rss-5b6172ac26c9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*jy6actxPzxCSUeQpmCaLyw.png</url>
            <title>Stories by AkshatApp on Medium</title>
            <link>https://medium.com/@akshatapp?source=rss-5b6172ac26c9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 12:27:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@akshatapp/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[Monetizing Apps using Google Mobile Ads SDK for Flutter]]></title>
            <link>https://akshatapp.medium.com/monetizing-apps-using-google-mobile-ads-sdk-for-flutter-6c75c100a854?source=rss-5b6172ac26c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c75c100a854</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[admob]]></category>
            <dc:creator><![CDATA[AkshatApp]]></dc:creator>
            <pubDate>Mon, 29 Mar 2021 14:00:00 GMT</pubDate>
            <atom:updated>2021-05-02T09:38:20.522Z</atom:updated>
            <content:encoded><![CDATA[<p>In this guide, we will learn how to monetize a Flutter app 📱(AdMob Ads) using google_mobile_ads package.</p><p>Integrating Google Mobile Ads SDK into a Flutter app is the first step towards displaying AdMob ads and earning revenue. Currently the plugin supports loading and displaying banner, interstitial (full-screen), native ads, and rewarded 🎁 video ads .</p><figure><img alt="Monetizing Apps using Google Mobile Ads SDK" src="https://cdn-images-1.medium.com/max/960/1*JJl7hZ8uH4B6MH4YM9iccQ.png" /><figcaption>Monetizing Apps using Google Mobile Ads SDK</figcaption></figure><p>In this guide, we will learn how to integrate banners ads, interstitial (full-screen) ads and rewarded video ads into a Flutter app.</p><p>We will build a sample application which will display test ads using sample ad units. These ad units are not associated with AdMob account and are sample ad units that are used for building and testing your apps.</p><p>Rewarded ads provide an opportunity for users to watch a video or engage with a playable ad in exchange for a reward within the app.</p><blockquote>🎁 Reward Coins increases after watching the Rewarded Video Ad</blockquote><figure><img alt="Flutter AdMob Test Ads App" src="https://cdn-images-1.medium.com/max/720/1*5AXtZb6Q12RrrPYU5KG8aw.gif" /><figcaption><strong>Flutter AdMob Test Ads App</strong></figcaption></figure><h3>How do I display AdMob ads in my Flutter app and start earning revenue 💰?</h3><p>This guide explains how to enable test ads in Flutter app. These ad units are not associated with your AdMob account and are sample ad units that are used for building and testing your apps.</p><p>If you want to publish your app to Play Store or App Store and start displaying AdMob ads and earn revenue then you will have to add your AdMob app ID in your AndroidManifest.xml file. You can find your AdMob app ID in the AdMob UI add it to your AndroidManifest.xml file. Also replace testAdUnitId with an ad unit ids from AdMob to display real ads to your app users.</p><p>Recommended: Create an AdMob account and register an Android app</p><h3>Prerequisites 📝</h3><p>Make sure you have installed/upgraded the Prerequisites : <a href="https://developers.google.com/admob/flutter/quick-start#prerequisites">Developer Guide</a></p><ol><li>Flutter 1.22.0 or higher ✅</li><li>Android</li></ol><ul><li>Android Studio 3.2 or higher ✅</li><li>Target Android API level 19 or higher ✅</li><li>Set compileSdkVersion to 28 or higher ✅</li><li>Android Gradle Plugin 4.1 or higher ✅</li></ul><h3>step 1 : Adding the package in pubspec.yaml</h3><p><strong>Flutter Package : </strong><a href="https://pub.dev/packages/google_mobile_ads"><strong>google_mobile_ads</strong></a></p><p>It is a plugin for flutter that supports loading and displaying banner, interstitial(full-screen), and rewarded video ads.</p><pre>dependencies:</pre><pre>google_mobile_ads: ^0.11.0+4</pre><figure><img alt="Adding Flutter Package" src="https://cdn-images-1.medium.com/max/1024/0*EcHvflSMBooLq3yU.png" /><figcaption>Adding Flutter Package</figcaption></figure><p>To learn how to use packages in flutter refer our (<a href="https://blog.akshatapp.com/2019/11/using-flutter-packages.html">Using Flutter Packages Guide</a>)</p><h3>step 2 : Add meta data to Android-Manifest.xml</h3><ul><li>Navigate to Android Manifest.xml file</li><li>Path to file : android/app/src/main/AndroidManifext.xml</li><li>Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713</li></ul><pre>&lt;manifest&gt;<br>    &lt;application&gt;<br>        &lt;!-- TODO: Replace ca-app-pub-################~########## with your AdMob App ID or Sample Admob App ID --&gt;<br>        &lt;meta-data<br>            android:name=&quot;com.google.android.gms.ads.APPLICATION_ID&quot;<br>            android:value=&quot;ca-app-pub-################~##########&quot;/&gt;<br>    &lt;/application&gt;<br>&lt;/manifest&gt;</pre><figure><img alt="Add meta data to Android-Manifest.xml" src="https://cdn-images-1.medium.com/max/1024/0*Zlwmf6ZHeOFuotX-.png" /><figcaption>Add meta data to Android-Manifest.xml</figcaption></figure><p>For more info : <a href="https://developers.google.com/admob/flutter/quick-start#platform_specific_setup">Developer Guide - Android Manifest xml</a></p><h3>step 3 : Coding — Sample Flutter App Code</h3><p>Note: Enable Wi-Fi or mobile network on your test device or emulator to see test ads</p><h4>📌How to Integrate Banner Ads into a Flutter app ?</h4><figure><img alt="Flutter Mobile Ads AdMob Banner Ad" src="https://cdn-images-1.medium.com/max/720/1*egUTealNPWdByWuxhYAKbA.gif" /><figcaption><strong>Flutter Banner Ad</strong></figcaption></figure><h4>📌How to Integrate Interstitial Ads into a Flutter app ?</h4><figure><img alt="Flutter Mobile Ads AdMob Interstitial Ad" src="https://cdn-images-1.medium.com/max/720/1*Jp-b6nWFSo-sBJywRHJRtA.gif" /><figcaption><strong>Flutter Interstitial Ad</strong></figcaption></figure><h4>📌How to Integrate Rewarded Video Ads into a Flutter app ?</h4><figure><img alt="Flutter Mobile Ads AdMob Rewarded Video Ad" src="https://cdn-images-1.medium.com/max/720/1*44XWLoLa6sGutcRhgEethA.gif" /><figcaption><strong>Flutter Rewarded Video Ad</strong></figcaption></figure><h4>💻This is a simple app demo to learn how to integrate admob ads in your flutter app.</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b0717810c911048ab202eebfae0dd298/href">https://medium.com/media/b0717810c911048ab202eebfae0dd298/href</a></iframe><pre>$ flutter clean<br>$ flutter run</pre><h4>GitHub Repository :📂 <a href="https://github.com/akshatapp/flutter_test_ads_app">flutter_test_ads_app</a></h4><h3>🔨 Top 3 Common Error Messages and Guide to Fix them</h3><p>You can skip this section if you are not facing any issues/errors</p><p><strong>ERROR 1 : </strong>Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:google_mobile_ads]</p><pre>Running Gradle task &#39;assembleDebug&#39;...                                  <br>/android/app/src/debug/AndroidManifest.xml Error:<br>        uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:google_mobile_ads] /build/google_mobile_ads/intermediates/library_manifest/debug/AndroidManifest.xml as the library might be using APIs not available in 16<br>        Suggestion: use a compatible library with a minSdk of at most 16,                                          <br>                or increase this project&#39;s minSdk version to at least 19,                                          <br>                or use tools:overrideLibrary=&quot;io.flutter.plugins.googlemobileads&quot; to force usage (may lead to runtime failures)<br>                                                                                                                <br>FAILURE: Build failed with an exception.                                                                           <br>                                                                                                                   <br>* What went wrong:                                                                                                 <br>Execution failed for task &#39;:app:processDebugManifest&#39;.                                                             <br>&gt; Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:google_mobile_ads] build/google_mobile_ads/intermediates/library_manifest/debug/AndroidManifest.xml as the library might be using APIs not available in 16<br>        Suggestion: use a compatible library with a minSdk of at most 16,                                          <br>                or increase this project&#39;s minSdk version to at least 19,                                          <br>                or use tools:overrideLibrary=&quot;io.flutter.plugins.googlemobileads&quot; to force usage (may lead to runtime failures)<br>                                                                                                                   <br>* Try:                                                                                                             <br>Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.<br>                                                                                                                   <br>* Get more help at https://help.gradle.org                                                                         <br>                                                                                                                   <br>BUILD FAILED in 2m 35s                                                                                             <br>Running Gradle task &#39;assembleDebug&#39;...                                                                             <br>Running Gradle task &#39;assembleDebug&#39;... Done                       156.1s (!)<br>Exception: Gradle task assembleDebug failed with exit code 1</pre><p><em>How to FIX this error :</em></p><ul><li>Navigate to build.gradle file</li><li>Path to file : android/app/build.gradle</li></ul><p>Check for the following versions :</p><ul><li>compileSdkVersion 29</li><li>minSdkVersion 19 ✅</li><li>targetSdkVersion 29</li></ul><figure><img alt="minSdkVersion 19 or higher" src="https://cdn-images-1.medium.com/max/983/1*MasKp6ZvPTImVjLoQ0kQJg.png" /><figcaption><strong>minSdkVersion 19 or higher</strong></figcaption></figure><p><strong>ERROR 2 :</strong> The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.</p><pre>FAILURE: Build failed with an exception.                                <br>                                                                        <br>* What went wrong:                                                      <br>Execution failed for task &#39;:app:processDebugResources&#39;.                 <br>&gt; A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade<br>   &gt; Android resource linking failed                                    <br>     /home/.gradle/caches/transforms-2/files-2.1/554200784d0157df45da8212b6e09519/play-services-ads-lite-19.7.0/AndroidManifest.xml:27:5-43:15: AAPT: error: unexpected element &lt;queries&gt; found in &lt;manifest&gt;.<br>                                                                        <br>                                                                        <br>* Try:                                                                  <br>Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.<br>                                                                        <br>* Get more help at https://help.gradle.org                              <br>                                                                        <br>BUILD FAILED in 9s                                                      <br>Running Gradle task &#39;assembleDebug&#39;...                                  <br>Running Gradle task &#39;assembleDebug&#39;... Done                         9.9s<br>The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.<br>Building plugin google_mobile_ads...<br>Exception: The plugin google_mobile_ads could not be built due to the issue above.</pre><p><em>How to FIX this error :</em></p><ul><li>Path to file : /android/build.gradle</li></ul><pre>dependencies { classpath &#39;com.android.tools.build:gradle:3.5.0&#39; classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version&quot; }</pre><ul><li>Change version to 4.1.1</li></ul><pre>dependencies { classpath &#39;com.android.tools.build:gradle:4.1.1&#39; classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version&quot; }</pre><figure><img alt="build gradle version 4.1.1" src="https://cdn-images-1.medium.com/max/1024/1*234I8JMR5tlS6oUosLe5Rg.png" /><figcaption><strong>build gradle version 4.1.1</strong></figcaption></figure><p><strong>ERROR 3 : </strong>Minimum supported Gradle version is 6.5. Current version is 5.6.2. If using the gradle wrapper, try editing the distributionUrl in /android/gradle/wrapper/gradle-wrapper.properties to gradle-6.5-all.zip</p><pre>FAILURE: Build failed with an exception.                                <br>                                                                        <br>* Where:                                                                <br>Build file &#39;/android/app/build.gradle&#39; line: 24<br>                                                                        <br>* What went wrong:                                                      <br>A problem occurred evaluating project &#39;:app&#39;.                           <br>&gt; Failed to apply plugin [id &#39;com.android.internal.version-check&#39;]      <br>   &gt; Minimum supported Gradle version is 6.5. Current version is 5.6.2. If using the gradle wrapper, try editing the distributionUrl in /android/gradle/wrapper/gradle-wrapper.properties to gradle-6.5-all.zip<br>                                                                        <br>* Try:                                                                  <br>Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.<br>                                                                        <br>* Get more help at https://help.gradle.org                              <br>                                                                        <br>BUILD FAILED in 425ms                                                   <br>Running Gradle task &#39;assembleDebug&#39;...                                  <br>Running Gradle task &#39;assembleDebug&#39;... Done                         0.9s<br>Exception: Gradle task assembleDebug failed with exit code 1</pre><p><em>How to FIX this error :</em></p><p>Edit the distributionUrl in gradle-wrapper.properties file</p><ul><li>Path to file : /android/gradle/wrapper/gradle-wrapper.properties</li></ul><pre>distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip</pre><ul><li>Change the distributionUrl zip package to gradle-6.5-all.zip</li></ul><pre>distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip</pre><figure><img alt="Gradle wrapper properties distribution urls - gradle-6.5-all.zip" src="https://cdn-images-1.medium.com/max/1024/1*BVcOzBcTPWnKc-qsvzP53Q.png" /><figcaption><strong>Gradle wrapper properties distribution urls - gradle-6.5-all.zip</strong></figcaption></figure><h3>📚Useful Resources</h3><ul><li><a href="https://developers.google.com/admob/android/test-ads#sample_ad_units">Developer Guide — Sample Ad units</a></li><li><a href="https://flutter.dev/ads">Flutter Docs</a></li><li><a href="https://developers.google.com/admob/flutter/quick-start">Developer Guide — Mobile Ads SDK for Flutter</a></li><li><a href="https://admob.google.com/home/resources/non-nonsense-guide-to-app-monetization-google-admob/">The No-Nonsense Guide to App Monetization</a></li></ul><p><em>Originally published at </em><a href="https://blog.akshatapp.com/2021/03/monetizing-flutter-apps.html"><em>https://blog.akshatapp.com</em></a><em> on March 29, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c75c100a854" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Integrate AdMob Ads in your flutter app using firebase_admob package ?]]></title>
            <link>https://akshatapp.medium.com/how-to-integrate-admob-ads-in-your-flutter-app-using-firebase-admob-package-7de2663286d3?source=rss-5b6172ac26c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/7de2663286d3</guid>
            <category><![CDATA[admob]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[dart]]></category>
            <dc:creator><![CDATA[AkshatApp]]></dc:creator>
            <pubDate>Sun, 08 Dec 2019 18:00:00 GMT</pubDate>
            <atom:updated>2022-08-10T15:06:31.894Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Integrate AdMob Ads in your Flutter app using firebase_admob package ?</h3><p>In this guide, we will learn how to integrate AdMob Ads in your flutter app using firebase_admob package. We will learn how to integrate banners ads and interstitial ads.</p><figure><img alt="Flutter Firebase AdMob Ads" src="https://cdn-images-1.medium.com/max/960/1*kNcDYgo3HmnBprYQuRZGNg.png" /><figcaption>Flutter Firebase AdMob Ads</figcaption></figure><p><strong>📢 This package has been discontinued in April 2021 in favor of Google Mobile Ads SDK for Flutter. Please refer our new guide.</strong></p><p><strong>Our New Guide : </strong><a href="https://akshatapp.medium.com/monetizing-apps-using-google-mobile-ads-sdk-for-flutter-6c75c100a854"><strong>Monetizing Flutter Apps</strong></a><strong> 💡</strong></p><p><strong>Flutter Package : </strong><a href="https://pub.dev/packages/google_mobile_ads"><strong>Google Mobile Ads SDK for Flutter</strong></a><strong> ✅</strong></p><p><strong>❌Flutter Package : firebase_admob </strong>❌<br>It is a plugin for flutter that supports loading and displaying banner, interstitial(full-screen), and rewarded video ads using Firebase AdMob API.</p><figure><img alt="firebase_admob" src="https://cdn-images-1.medium.com/max/1024/1*zRCC89ocQFdzMnfZZCu7Pw.png" /><figcaption><strong>firebase_admob</strong></figcaption></figure><p>Learn More : <a href="https://pub.dev/packages/firebase_admob">firebase_admob</a></p><h3>step 1 : Add package name - firebase_admob in pubspec.yaml</h3><p>firebase_admob: ^0.9.0+9</p><p>To learn how to use packages in flutter refer our <a href="https://blog.akshatapp.com/2019/11/using-flutter-packages.html">Using Flutter Packages Guide</a></p><figure><img alt="Adding Flutter Package" src="https://cdn-images-1.medium.com/max/1024/1*65O-88Lp-Wto1sJ3v8cYVw.png" /><figcaption>Adding Flutter Package</figcaption></figure><h3>step 2 : Add meta data to Android-Manifest.xml</h3><ul><li>Replace ca-app-pub-################~##########with your real AdMob app ID or a test app ID.</li></ul><pre>&lt;manifest&gt;<br>    &lt;application&gt;<br>        &lt;!-- TODO: Replace with your real AdMob app ID --&gt;<br>        &lt;meta-data<br>            android:name=&quot;com.google.android.gms.ads.APPLICATION_ID&quot;<br>            android:value=&quot;ca-app-pub-################~##########&quot;/&gt;<br>    &lt;/application&gt;<br>&lt;/manifest&gt;</pre><figure><img alt="Adding meta-data to AndroidManifest.xml" src="https://cdn-images-1.medium.com/max/1024/1*HYnfEezX6JMIGdRdAOlt_g.png" /><figcaption>Adding meta-data to AndroidManifest.xml</figcaption></figure><h3>step 3 : Coding : Sample Flutter App Code</h3><p>Note : Use Stateful Widgets</p><p>This is a simple app demo to learn how to integrate admob ads in your flutter app.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b1b6a5a72319aab7c495c5869652cdce/href">https://medium.com/media/b1b6a5a72319aab7c495c5869652cdce/href</a></iframe><h3>How to Implement Banner Ads ?</h3><ul><li>Define Banner Ad Property</li><li>Set size (Banner Size) — largeBanner, banner etc</li><li>Set adUnitId (here we are using TestAdUnitId)</li><li>Default Banner location — bottom of the screen</li><li>You can even set banner location to top using anchorType property as shown below</li><li>Provide anchorOffset value to avoid overlap with common UI elements on the screen.</li><li>Using listener, once the ad is loaded , show your banner ad using ..show() method</li></ul><figure><img alt="Define Banner Ad Property" src="https://cdn-images-1.medium.com/max/1024/1*CsVKeiThRep3Rra92uwe7Q.png" /><figcaption>Define Banner Ad Property</figcaption></figure><ul><li>Ads must be loaded before they are shown. Load your ads in initState Method</li><li>Also, intialize FirebaseAdMob instance — appId. Here we are using testAppId</li></ul><figure><img alt="Load Banner Ad" src="https://cdn-images-1.medium.com/max/1024/1*LsyZdFFZrLZJJF1IG9kGNw.png" /><figcaption>Load Banner Ad</figcaption></figure><h4>Banner Ad Demo App User Interface</h4><p>Select BannerAd button to open a BannerAd Page</p><figure><img alt="Demo App HomeScreen — BannerAd" src="https://cdn-images-1.medium.com/max/494/1*HhHBfOesHHpgNVqEiApRsg.png" /><figcaption>Demo App HomeScreen — BannerAd</figcaption></figure><h4><strong>Banner Ad Demo Ad 1 — buildBannerAd()</strong></h4><ul><li>Default size Banner Test Ad displayed at the bottom of the screen</li></ul><figure><img alt="Banner Ad" src="https://cdn-images-1.medium.com/max/1024/1*O9otRyZ5SeE_AYg-JQdArw.png" /><figcaption>Banner Ad</figcaption></figure><h4><strong>Banner Ad Demo Ad 2 — buildLargeBannerAd()</strong></h4><ul><li>Large Banner Ad at the top of the screen</li><li>Offset allows us to place ad below the AppBar so that it does not overlap with other UI elements on the screen.</li></ul><figure><img alt="Large Banner Ad" src="https://cdn-images-1.medium.com/max/1024/1*3iD-Ce8Gi4O-l9haoxcfkg.png" /><figcaption>Large Banner Ad</figcaption></figure><h3>How to Implement Interstitial Ads ?</h3><ul><li>Define Interstitial Ad Property</li><li>Set adUnitId (here we are using testAdUnitId)</li><li>MobileAdEvent.closed — user closes a ad</li></ul><pre>this load() method keeps another ad ready to be displayed when the right time comes - when show() method is invoked</pre><ul><li>showInterstitialAd() — shows interstitial ads every time when a user navigates from one screen to another.</li><li>showRandomInterstitialAd() — showing ads every time can be annoying to users, so we can use this method to show ads randomly.</li></ul><figure><img alt="Define Interstitial Ad Property" src="https://cdn-images-1.medium.com/max/1024/1*1S1oh9ZNRqAeGXmpTEomlw.png" /><figcaption>Define Interstitial Ad Property</figcaption></figure><ul><li>Ads must be loaded before they are shown. Load your ads in initState Method</li></ul><figure><img alt="Load Interstitial Ad" src="https://cdn-images-1.medium.com/max/1024/1*6LMOtEJL_UxwAIpzqfEpyA.png" /><figcaption>Load Interstitial Ad</figcaption></figure><ul><li>To Display your ad — call showInterstitialAd() or showRandomInterstitialAd() on button press</li></ul><figure><img alt="Show Interstitial Ad" src="https://cdn-images-1.medium.com/max/1024/1*rFXE62seqaHv2YXUDBJBXw.png" /><figcaption>Show Interstitial Ad</figcaption></figure><p>Note: Enable WiFi or mobile network on your test device or emulator to see test ads.</p><h4>Interstitial Ad Demo App User Interface</h4><ul><li>Select InterstitialAd button to open Interstitial Ad Page</li></ul><figure><img alt="Demo App HomeScreen — Interstitial Ad" src="https://cdn-images-1.medium.com/max/494/1*-Y9dOg9Tqhue1XY6waBHEQ.png" /><figcaption>Demo App Home Screen — Interstitial Ad</figcaption></figure><figure><img alt="Flutter Interstitial Ad Demo" src="https://cdn-images-1.medium.com/max/1024/1*c3_2FAIzTGx4b-H3ADekyw.png" /><figcaption>Flutter Interstitial Ad Demo</figcaption></figure><h3>How can I apply this guide to my real Android App ?</h3><p>This guide explains how to enable test ads in your app. These ad units are not associated with your AdMob account and are sample ad units that are used for building and testing your apps.</p><p>Note : If you want to publish your app to Play Store or App Store then you will have to add your AdMob app ID in your AndroidManifest.xml file. Once you find your AdMob app ID in the AdMob UI add it to your AndroidManifest.xml file as explained in step 2.</p><pre>&lt;manifest&gt;<br>    &lt;application&gt;<br>        &lt;!-- TODO: Replace with your real AdMob app ID --&gt;<br>        &lt;meta-data<br>            android:name=&quot;com.google.android.gms.ads.APPLICATION_ID&quot;<br>            android:value=&quot;ca-app-pub-################~##########&quot;/&gt;<br>    &lt;/application&gt;<br>&lt;/manifest&gt;</pre><p>Also replace testAdUnitId with an ad unit ids from AdMob to display real ads to your app users.</p><pre>BannerAd buildBannerAd() {<br>    return BannerAd(</pre><pre> <strong><em>// Replace the testAdUnitId with an ad unit id from the AdMob dash.</em></strong></pre><pre>        adUnitId: BannerAd.testAdUnitId,<br>        size: AdSize.banner,<br> ...<br>  }</pre><p>Read more at : <a href="https://developers.google.com/admob/android/test-ads#sample_ad_units">Developer Guide - Sample Ad units</a></p><h3>Useful Resources</h3><p><a href="https://developers.google.com/admob/android/quick-start#update_your_androidmanifestxml">Developer Guide - Update your AndroidManifest.xml</a></p><p><a href="https://admob.google.com/home/resources/non-nonsense-guide-to-app-monetization-google-admob/">The No-Nonsense Guide to App Monetization</a></p><p><em>Originally published at </em><a href="https://blog.akshatapp.com/2019/12/flutter-firebase-admob-ads.html"><em>https://blog.akshatapp.com</em></a><em> on December 8, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7de2663286d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install Flutter on Linux - Developer Guide]]></title>
            <link>https://akshatapp.medium.com/install-flutter-on-linux-developer-guide-3d336461b023?source=rss-5b6172ac26c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d336461b023</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[AkshatApp]]></dc:creator>
            <pubDate>Sat, 07 Dec 2019 16:30:00 GMT</pubDate>
            <atom:updated>2020-12-31T18:14:18.230Z</atom:updated>
            <content:encoded><![CDATA[<h3>Install Flutter on Linux -Developer Guide</h3><figure><img alt="flutter install developer guide linux" src="https://cdn-images-1.medium.com/max/960/1*hhi1cZI2Q9PulMRjU_XoBA.png" /></figure><p>This is a free guide to help developers get started with flutter which is an open-source project, with contributions from Google and the community.</p><h3>flutter installation step-by-step guide : Linux (64 bit)</h3><h4>step 1 : Download the following installation bundles and tools to get started</h4><ul><li>Get the Flutter SDK (latest stable version) — <a href="https://flutter.dev/docs/get-started/install/linux#get-the-flutter-sdk">Official flutter docs</a></li><li>Get the Android Studio — <a href="https://developer.android.com/studio">Download Android Studio</a></li></ul><figure><img alt="Download Flutter Installation Bundles &amp; Tools" src="https://cdn-images-1.medium.com/max/898/1*A8FTGH3TcEbitMhVq51SaQ.gif" /><figcaption>Download Flutter Installation Bundles &amp; Tools</figcaption></figure><h4>step 2 : Create a directory named “workspace”- this folder will contain all your projects, flutter sdk and all its dependencies.</h4><ul><li>Create a folder named “workspace” on your Desktop</li><li>Extract the files downloaded in step 1</li><li>In your Downloads folder, To extract files, Right click on the file =&gt; Select “Extract Here”</li><li>Search for folders named “android-studio” &amp; “flutter” in the above extracted folders.</li><li>Move “android-studio” &amp; “flutter” folders into your “workspace” folder created on your Desktop.</li></ul><p>Note : By this stage your should have a “workspace” folder on your desktop which contains “android-studio” &amp; “flutter” named folders.<br> Now proceed with step 3</p><figure><img alt="Create Flutter Project Folders" src="https://cdn-images-1.medium.com/max/892/1*Wkqj1oTvPl-ETyNhUMU2nw.gif" /><figcaption>Create Flutter Project Folders</figcaption></figure><h4>step 3 : Install Android Studio Linux</h4><p>Open Terminal, run command :</p><pre>$ cd Desktop/workspace/android-studio/bin <br>$ ./studio.sh</pre><p>./studio.sh above command is used to run android studio setup wizard</p><ul><li>Now, create folder named “Android” inside your “workspace” directory on your Desktop</li><li>Also create folder named “Sdk” which is inside newly created “Android” folder above.</li><li>This folder will be used as “Android SDK Location” while setting up Android Studio.</li></ul><figure><img alt="Android SDK Path" src="https://cdn-images-1.medium.com/max/894/1*cpJdTUngMSCB72KIytAKQg.gif" /><figcaption>Android SDK Path</figcaption></figure><p><strong>Android Studio Setup Wizard</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*QEGjq23O0C2imliJitTJWg.gif" /><figcaption>Install Android Studio Linux</figcaption></figure><ul><li>Once the setup wizard is loaded</li><li>Select do not import settings</li><li>Click Next</li><li>Select Custom installation</li><li>Select the Dark theme</li><li>SDK Component Setup — Ensure you have tick mark on</li></ul><ol><li>Android SDK (component required)</li><li>Android Virtual Device (component required)</li><li>Select all other options as well to save time in future (Optional)</li></ol><ul><li>Now , set the “Android SDK Location”</li><li><strong>Android SDK Location = /home/dev/Desktop/workspace/Android/Sdk</strong></li><li><strong>Note : replace dev in the above sdk path with your username</strong></li><li>Click on Next to verify settings</li><li>Click Next and it will download the required files</li><li>Please check your connection. Internet Connection is required to download the files</li><li>Click on Finish once the download and installation is successfully completed.</li><li>Close Android Studio</li></ul><h4>step 4 : Update your PATH variable</h4><ul><li>Go to your HOME folder =&gt; Options =&gt; Show Hidden files</li><li>locate the .bashrc file in file explorer</li><li>Create a backup of the .bashrc file or .bash_profile (for macOS) file</li><li>Edit .bashrc file =&gt; Right click Open with text editor</li></ul><pre>PATH=$PATH:/home/dev/Desktop/workspace/flutter/bin PATH=$PATH:/home/dev/Desktop/workspace/Android/Sdk PATH=$PATH:/home/dev/Desktop/workspace/Android/Sdk/tools PATH=$PATH:/home/dev/Desktop/workspace/Android/Sdk/platform-tools PATH=$PATH:/home/dev/Desktop/workspace/android-studio/bin</pre><ul><li>Add the above lines at the bottom of the .bashrc file</li><li>Click “Save” and exit the file.</li><li>Note : “dev” in the above path is username of our machine. Please replace “dev” inside above lines with your username</li></ul><figure><img alt="Update PATH variable" src="https://cdn-images-1.medium.com/max/896/1*Y0jB2KA8QH5wiMghbaFvQg.gif" /><figcaption>Update PATH variable</figcaption></figure><p>Explanation of the above lines that are added to the .bashrc file</p><ol><li>flutter bin environment variable</li></ol><pre>PATH=$PATH:/home/dev/Desktop/workspace/flutter/bin</pre><p>Note : replace “dev” inside the above command with your username</p><p>2. android sdk environment variables</p><pre>PATH=$PATH:/home/dev/Desktop/workspace/Android/Sdk PATH=$PATH:/home/dev/Desktop/workspace/Android/Sdk/tools PATH=$PATH:/home/dev/Desktop/workspace/Android/Sdk/platform-tools</pre><p>Note : replace “dev” inside the above command with your username</p><p>3. android studio environment variable</p><pre>PATH=$PATH:/home/dev/Desktop/workspace/android-studio/bin</pre><p>Note : replace “dev” inside the above command with your username</p><ul><li>Verify your updated PATH variable using cmd :</li></ul><pre>echo $PATH</pre><h4>step 5 : Install Android Studio Plugin</h4><p>Open android studio using terminal command studio.sh</p><pre>$ studio.sh</pre><ul><li>Select Configure =&gt; Plugins</li><li>Search for Flutter Plugin in the search bar and install</li><li>This will install both flutter and dart plugins</li><li>Restart Android Studio</li><li>New option to create a flutter application is now available in Android Studio</li><li>Click on “Create flutter application” option</li><li>Enter your app name, sdk location, project location, package name and some other required information</li><li>Click finish</li><li>Android studio will now create a starter flutter project</li><li>Your flutter project is now ready.</li></ul><figure><img alt="Install Android Studio Plugins" src="https://cdn-images-1.medium.com/max/800/1*EgDQccfBDPGihhUkLVOlKA.gif" /><figcaption>Install Android Studio Plugins</figcaption></figure><h4>step 6 : Test your flutter environment setup</h4><p>Note : Keep your linux system up-to-date (System Updates) which helps in installing common dependencies required by flutter</p><p><strong>Accept android-licenses (Mandatory)</strong></p><pre>flutter doctor --android-licenses</pre><p><strong>Disable Flutter Analytics (Optional)</strong></p><pre>flutter config --no-analytics</pre><p><strong>Run flutter doctor to test the environment setup</strong></p><pre>$ flutter doctor<br><br> Doctor summary (to see all details, run flutter doctor -v):<br>    [✓] Flutter (Channel stable, v1.9.1+hotfix.4, on Linux, locale en_US.UTF-8)<br> <br>    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)<br>    [✓] Android Studio (version 3.5)<br>    [!] Connected device<br>    ! No devices available</pre><p>The above command should show all check marks to ensure that flutter installation is complete.</p><h4>step 7 : Common Errors/Warnings Guide while running flutter doctor command</h4><ul><li>Error : Unable to find git in your PATH Run command to Install git 2.x</li></ul><pre>sudo apt-get install git</pre><p>Keep your linux system up-to-date (System Updates) which helps in installing common dependencies required by flutter to avoid common errors/warnings while running flutter doctor command.</p><h4>step 8 : Install Visual Studio Code (Optional)</h4><h4>Get Visual Studio Code Editor (Optional) <a href="https://code.visualstudio.com/">Download Visual Studio Code</a></h4><ul><li>Install VS Code</li><li>Install VS Code Extensions</li><li>Flutter</li><li>Dart =&gt; this will automatically be installed with flutter extension</li><li>Go to View Menu =&gt; Select Command Palette or Press Ctrl+Shift+P</li><li>Type flutter in the Command Palette window</li><li>Select <strong>Flutter:New Project</strong> option</li><li>Provide a name to your project</li><li>Select your desired location to store all your projects</li><li>VS Code will now create a starter flutter project</li></ul><p>Note : We can use Android Studio or Visual Studio Code Editor [ANY ONE] to develop flutter apps</p><h4>step 9 : Launch your Android Emulator</h4><p><strong>Launch Emulator using Android Studio AVD Manager</strong></p><ul><li>Open Android Studio</li><li>Navigate to AVD Manager</li><li>Select a device from the list</li><li>Click on PLAY BUTTON to start the emulator</li></ul><p><strong>Launch Emulator using VS Code</strong></p><ul><li>Check bottom-right corner of vs code</li><li>Click on “No Device” option</li><li>Select a emulator from the list</li><li>Click on the device name to start the emulator</li></ul><p><strong>You can use the default AVD created during Android Studio Setup or create your own AVD.</strong></p><h4>Bonus Tip : Troubleshooting Android Emulator — Android Emulator not working ?</h4><p><strong>Error List</strong></p><ul><li>Please ensure KVM is properly installed</li><li>Error 1 : KVM is required to run this AVD</li><li>Error 2 : User does not have permission to use KVM (/dev/kvm)</li></ul><p><strong>Error 1 : KVM is required to run this AVD</strong></p><pre>$ sudo apt-get install qemu-kvm</pre><ul><li>Restart your machine</li></ul><p><strong>Error 2 : User does not have permission to use KVM (/dev/kvm)</strong></p><pre>$ sudo adduser $USER kvm</pre><p>above command adds the current user</p><pre>$ echo $USER</pre><p>above command prints current username</p><ul><li>Restart your machine</li></ul><p>Check official docs for more details — <a href="https://developer.android.com/studio/run/emulator-acceleration">Android Developer Docs — Emulator Acceleration</a></p><p>To learn more about flutter — <a href="https://www.akshatapp.com/tutorials/flutter-tutorial">Flutter Developer Guide</a></p><p><em>Originally published at </em><a href="https://blog.akshatapp.com/2019/12/flutter-linux-install-guide.html"><em>https://blog.akshatapp.com</em></a><em> on December 7, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d336461b023" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Image Developer Guide]]></title>
            <link>https://akshatapp.medium.com/flutter-image-developer-guide-a5eee1b86287?source=rss-5b6172ac26c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5eee1b86287</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[AkshatApp]]></dc:creator>
            <pubDate>Thu, 28 Nov 2019 18:00:00 GMT</pubDate>
            <atom:updated>2022-08-10T15:07:40.582Z</atom:updated>
            <content:encoded><![CDATA[<p>In this guide we will learn how to display images in your flutter app.<br>We will use Flutter Image Class to implement images in flutter.</p><figure><img alt="Flutter Image Developer Guide" src="https://cdn-images-1.medium.com/max/960/1*yynquhX6Z-PcYLwGECVURw.png" /><figcaption>Flutter Image Developer Guide</figcaption></figure><h4>step 1 : Create “assets/images” folder in your project directory</h4><ul><li>Create “assets” folder in your project root directory.</li><li>Create “images” folder in your assets folder.</li></ul><figure><img alt="Flutter Assets Images" src="https://cdn-images-1.medium.com/max/246/1*_0YiKcZ958-nG3RGZW9_zg.png" /><figcaption>Flutter Assets Images</figcaption></figure><p><em>Note : Your “assets” folder will have “images” and many other project assets like “fonts”, “icons”, “animation files” etc.</em></p><h4>step 2 : Add images to your “images” folder</h4><ul><li>Just drag-n-drop your image inside the “images” folder</li><li>Image Relative Path : assets/images/bluetruck.png</li></ul><figure><img alt="Add images to your flutter project" src="https://cdn-images-1.medium.com/max/1024/1*XC6lwgdzNFmnzV9Takcz1Q.png" /><figcaption>Add images to your flutter project</figcaption></figure><h4>step 3 : Register your assets folder in pubspec.yaml file</h4><ul><li>Open pubspec.yaml file</li><li>Add assets subsection to the flutter section or uncomment the assets section and add your image relative path.</li><li>Save the pubspec.yaml file and run “flutter pub get command” in terminal.</li></ul><ol><li>If using Android Studio — Save the file and Click Packages get in action ribbon.</li><li>If using VS Code : It automatically runs command on saving pubspec.yaml file.</li></ol><figure><img alt="Flutter pubspec.yaml file" src="https://cdn-images-1.medium.com/max/681/1*oHdUKGaA0GNScFKIrDf2ng.png" /><figcaption>Flutter pubspec.yaml file</figcaption></figure><p><em>Note : If you have multiple images that you want to include in your project then you can skip the filename.</em></p><p>For Example :</p><pre>assets:</pre><pre>- assets/images/</pre><ul><li>This includes all the images inside “images” folder.</li><li>This is helpful when we have many images to be included in our project.</li><li>Say, we have 25 images in our “images folder” so we will not have to register each image filename inside pubspec.yaml file separately.</li><li>Using the above syntax we can include all images in a single line.</li></ul><h4>step 4 : Code Implementation - Use Flutter Image class</h4><p>Flutter Image Class - <a href="https://api.flutter.dev/flutter/widgets/Image-class.html"><em>Documentation</em></a></p><p>Also refer official class documentation with this guide to deeply understand the concept.</p><p>Let us start with the simplest way to display images in our flutter app.</p><h4>Coding : Flutter Sample App Code</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0ca519a34d64cd1e978f54fa0f1a778b/href">https://medium.com/media/0ca519a34d64cd1e978f54fa0f1a778b/href</a></iframe><figure><img alt="Flutter Image Class" src="https://cdn-images-1.medium.com/max/887/1*CqhhWLP3nQSrol0QFIHeQA.png" /><figcaption>Flutter Image Class</figcaption></figure><p><em>Originally published at </em><a href="https://blog.akshatapp.com/2019/11/flutter-image-guide.html"><em>https://blog.akshatapp.com</em></a><em> on November 28, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5eee1b86287" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Button Developer Guide]]></title>
            <link>https://akshatapp.medium.com/flutter-button-developer-guide-f720a8d46688?source=rss-5b6172ac26c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/f720a8d46688</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[AkshatApp]]></dc:creator>
            <pubDate>Wed, 27 Nov 2019 18:15:00 GMT</pubDate>
            <atom:updated>2022-08-10T15:09:44.272Z</atom:updated>
            <content:encoded><![CDATA[<p>In this guide we will learn how to implement buttons in your flutter app. There are many classes or widgets which can be used to implements buttons in your flutter app. In this guide we will learn how to implement button functionality using material button widgets.</p><figure><img alt="Flutter Button Developer Guide" src="https://cdn-images-1.medium.com/max/960/1*8H7UHInJrFl4cB_TNVZixA.png" /><figcaption>Flutter Button Developer Guide</figcaption></figure><p><strong>Widgets or Classes to implement button functionality</strong></p><ol><li>FlatButton Class [Basic]</li><li>RaisedButton Class [Basic]</li><li>IconButton Class [Basic]</li><li>FloatingActionButton Class [Basic]</li><li>ButtonBar Class [Advanced]</li><li>DropdownButton Class [Advanced]</li><li>PopupMenuButton Class [Advanced]</li></ol><p>In this guide, we will learn all the material button widgets listed on the official flutter docs</p><p><a href="https://flutter.dev/docs/development/ui/widgets/material#Buttons">Material Button Documentation</a></p><p>Let us start with the simplest way to implement buttons in flutter</p><h3>1. FlatButton Class</h3><p><a href="https://api.flutter.dev/flutter/material/FlatButton-class.html"><em>Documentation</em></a></p><p>Also refer official class documentation with this guide to deeply understand the concept.</p><p>A flat button is a text label displayed on a zero elevation Material widget.</p><p><strong>FlatButton Class Constructor</strong></p><pre>FlatButton({Key key, @required VoidCallback onPressed, ValueChanged&lt;bool&gt; onHighlightChanged, ButtonTextTheme textTheme, Color textColor, Color disabledTextColor, Color color, Color disabledColor, Color focusColor, Color hoverColor, Color highlightColor, Color splashColor, Brightness colorBrightness, EdgeInsetsGeometry padding, ShapeBorder shape, Clip clipBehavior, FocusNode focusNode, bool autofocus: false, MaterialTapTargetSize materialTapTargetSize, @required Widget child })</pre><p><strong>Required Parameters</strong></p><ul><li>‘onPressed’ parameter is required</li><li>‘child’ parameter is required</li></ul><figure><img alt="FlatButton Implementation" src="https://cdn-images-1.medium.com/max/1024/1*cJhtPEubfrICfGyHFe2rTw.png" /><figcaption>FlatButton Implementation</figcaption></figure><p>let’s add some more properties like colors etc.</p><p>Refer official class documentation for property list</p><figure><img alt="FlatButton Color Parameters" src="https://cdn-images-1.medium.com/max/1024/1*la1pe5UpqQqFj1StNpuQEg.png" /><figcaption>FlatButton Color Parameters</figcaption></figure><p><strong>How to disable a button ?</strong></p><p><em>Set onPressed VoidCallback to ‘null’</em></p><figure><img alt="FlatButton Disabled" src="https://cdn-images-1.medium.com/max/1024/1*gewbHZ1LRXEP1ODreN8e4A.png" /><figcaption>FlatButton Disabled</figcaption></figure><p><strong>FlatButton.icon Constructor</strong></p><figure><img alt="FlatButton.icon Constructor" src="https://cdn-images-1.medium.com/max/1024/1*s-4ywP9fJOAL2PBzGrCn5A.png" /><figcaption>FlatButton.icon Constructor</figcaption></figure><h3>2. RaisedButton Class</h3><p><a href="https://api.flutter.dev/flutter/material/RaisedButton-class.html"><em>Documentation</em></a></p><p>Also refer official class documentation with this guide to deeply understand the concept.</p><p>Button with elevation</p><p><strong>RaisedButton Class Constructor</strong></p><pre>RaisedButton({Key key, @required VoidCallback onPressed, ValueChanged&lt;bool&gt; onHighlightChanged, ButtonTextTheme textTheme, Color textColor, Color disabledTextColor, Color color, Color disabledColor, Color focusColor, Color hoverColor, Color highlightColor, Color splashColor, Brightness colorBrightness, double elevation, double focusElevation, double hoverElevation, double highlightElevation, double disabledElevation, EdgeInsetsGeometry padding, ShapeBorder shape, Clip clipBehavior, FocusNode focusNode, bool autofocus: false, MaterialTapTargetSize materialTapTargetSize, Duration animationDuration, Widget child })</pre><p><strong>Required Parameters</strong></p><ul><li>‘onPressed’ parameter is required</li></ul><figure><img alt="RaisedButton Implementation" src="https://cdn-images-1.medium.com/max/1024/1*FhnIxwsFIxcz7xOM3I9tRg.png" /><figcaption>RaisedButton Implementation</figcaption></figure><p>let’s add some more properties like colors etc.</p><p>Refer official class documentation for property list</p><figure><img alt="RaisedButton Color Parameters" src="https://cdn-images-1.medium.com/max/1024/1*hUkuIBX5bL82_Af7mEZPoQ.png" /><figcaption>RaisedButton Color Parameters</figcaption></figure><p><strong>RaisedButton.icon Constructor</strong></p><figure><img alt="RaisedButton.icon Constructor" src="https://cdn-images-1.medium.com/max/1024/1*z4Z6hnVOSd0YgS5u_bj4AA.png" /><figcaption>RaisedButton.icon Constructor</figcaption></figure><h3>3. IconButton Class</h3><p><a href="https://api.flutter.dev/flutter/material/IconButton-class.html"><em>Documentation</em></a></p><p>Also refer official class documentation with this guide to deeply understand the concept.</p><p><strong>IconButton Class Constructor</strong></p><pre>IconButton({Key key, double iconSize: 24.0, EdgeInsetsGeometry padding: const EdgeInsets.all(8.0), AlignmentGeometry alignment: Alignment.center, @required Widget icon, Color color, Color focusColor, Color hoverColor, Color highlightColor, Color splashColor, Color disabledColor, @required VoidCallback onPressed, FocusNode focusNode, bool autofocus: false, String tooltip })</pre><p><strong>Required Parameters</strong></p><ul><li>‘onPressed’ parameter is required</li><li>‘icon’ parameter is required</li></ul><figure><img alt="IconButton Class Implementation" src="https://cdn-images-1.medium.com/max/1024/1*shW5Wqo6pk4wKabcxyE-nw.png" /><figcaption>IconButton Class Implementation</figcaption></figure><p>let’s add some more properties like colors etc.</p><p>Refer official class documentation for property list</p><figure><img alt="IconButton Color Parameters" src="https://cdn-images-1.medium.com/max/1024/1*BOF66YF15DG6bzdKrPBUdA.png" /><figcaption>IconButton Color Parameters</figcaption></figure><h3>4. FloatingActionButton Class</h3><p><a href="https://api.flutter.dev/flutter/material/FloatingActionButton-class.html"><em>Documentation</em></a></p><p>Also refer official class documentation with this guide to deeply understand the concept.</p><ul><li>floating action button is a circular icon button that hovers over content to promote a primary action.</li><li>Use at most single floating action button per screen</li></ul><p><strong>FloatingActionButton Class Constructor</strong></p><pre>FloatingActionButton({Key key, Widget child, String tooltip, Color foregroundColor, Color backgroundColor, Color focusColor, Color hoverColor, Color splashColor, Object heroTag: const _DefaultHeroTag(), double elevation, double focusElevation, double hoverElevation, double highlightElevation, double disabledElevation, @required VoidCallback onPressed, bool mini: false, ShapeBorder shape, Clip clipBehavior: Clip.none, FocusNode focusNode, bool autofocus: false, MaterialTapTargetSize materialTapTargetSize, bool isExtended: false })</pre><p><strong>Required Parameters</strong></p><ul><li>‘onPressed’ parameter is required</li></ul><p><strong>Scaffold has a floatingActionButton Parameter</strong></p><p><a href="https://api.flutter.dev/flutter/material/Scaffold/Scaffold.html"><em>Scaffold Constructor Documentation</em></a></p><figure><img alt="FloatingActionButton Implementation" src="https://cdn-images-1.medium.com/max/1024/1*w_QD61wQ-crgz9VfWQj6vw.png" /><figcaption>FloatingActionButton Implementation</figcaption></figure><p>let’s add some more properties like colors etc.</p><p>Refer official class documentation for property list</p><figure><img alt="FloatingActionButton Tooltip" src="https://cdn-images-1.medium.com/max/1024/1*t6tk9zhFuMmX1g5D_o73Rg.png" /><figcaption><strong>FloatingActionButton Tooltip</strong></figcaption></figure><p><strong>FloatingActionButton.extended constructor</strong></p><pre>FloatingActionButton.extended({Key key, String tooltip, Color foregroundColor, Color backgroundColor, Color focusColor, Color hoverColor, Object heroTag: const _DefaultHeroTag(), double elevation, double focusElevation, double hoverElevation, Color splashColor, double highlightElevation, double disabledElevation, @required VoidCallback onPressed, ShapeBorder shape, bool isExtended: true, MaterialTapTargetSize materialTapTargetSize, Clip clipBehavior: Clip.none, FocusNode focusNode, bool autofocus: false, Widget icon, @required Widget label })</pre><p><strong>Required Parameters</strong></p><ul><li>‘onPressed’ parameter is required</li><li>‘label’ parameter is required</li></ul><figure><img alt="FloatingActionButton.extended Constructor" src="https://cdn-images-1.medium.com/max/1024/1*7edbtnZkuw3un1iFQ4EzMw.png" /><figcaption>FloatingActionButton.extended Constructor</figcaption></figure><h3>5. ButtonBar Class</h3><p><a href="https://api.flutter.dev/flutter/material/ButtonBar-class.html"><em>Documentation</em></a></p><p>Also refer official class documentation with this guide to deeply understand the concept.</p><ul><li>Use this class when you have to display multiple buttons in a horizontal layout.</li><li>Do not use row widget, instead use ButtonBar class which is designed to acheive such common layouts effectively.</li></ul><p><strong>ButtonBar Class Constructor</strong></p><pre>ButtonBar({Key key, MainAxisAlignment alignment: MainAxisAlignment.end, MainAxisSize mainAxisSize: MainAxisSize.max, List&lt;Widget&gt; children: const [] })</pre><p>children [] — List of the buttons to be arranged horizontally.</p><p>lets add some more parameters or properties : refer official class documentation for property list</p><ul><li>alignment: MainAxisAlignment.center — How the children should be placed along the horizontal axis.</li><li>mainAxisSize: MainAxisSize.max — How much horizontal space is available.</li></ul><figure><img alt="ButtonBar Implementation" src="https://cdn-images-1.medium.com/max/1024/1*04C8ZSkMBqOiXkYCZSO7ow.png" /><figcaption>ButtonBar Implementation</figcaption></figure><h3>6. DropdownButton Class</h3><p><a href="https://api.flutter.dev/flutter/material/DropdownButton-class.html">Documentation</a></p><p>Also refer official class documentation with this guide to deeply understand the concept.</p><p>A drop-down button lets the user select from a number of items. Dropdown button allows us build simple input user interface to select list items. Common examples : select countries, currencies, states etc in our flutter app</p><p><strong>DropdownButton Class Constructor</strong></p><pre>DropdownButton({Key key, @required List&lt;DropdownMenuItem&lt;T&gt;&gt; items, T value, Widget hint, Widget disabledHint, @required ValueChanged&lt;T&gt; onChanged, int elevation: 8, TextStyle style, Widget underline, Widget icon, Color iconDisabledColor, Color iconEnabledColor, double iconSize: 24.0, bool isDense: false, bool isExpanded: false })</pre><p><strong>Required Parameter</strong></p><ul><li>items</li></ul><p><strong>Implementation</strong></p><ol><li>Create a Dropdown StatefulWidget.</li><li>Create a list of dropdown items.</li><li>Create a variable for default selected item.</li><li>Main properties required for DropdownButton class implementation</li></ol><ul><li>items</li><li>onChanged</li><li>value</li></ul><p>5. items property will contain DropdownMenuItem class implementation as shown below</p><p>6. Main properties required to implement DropdownMenuItem class</p><ul><li>value</li><li>child - Text Widget</li></ul><figure><img alt="DropdownButton Class Implementation" src="https://cdn-images-1.medium.com/max/1024/1*5uF2pftg9YLDwkLsED3u0A.png" /><figcaption>DropdownButton Class Implementation</figcaption></figure><p>let’s add some more properties like colors etc.</p><p>Refer official class documentation for property list</p><p>icon - The widget to use for the drop-down button’s icon</p><ul><li>iconEnabledColor</li><li>iconDisabledColor</li></ul><figure><img alt="DropdownButton Class Properties" src="https://cdn-images-1.medium.com/max/1024/1*LZzdYvkI9z0ZwZ5Yad17rA.png" /><figcaption>DropdownButton Class Properties</figcaption></figure><h3>7. PopupMenuButton&lt;T&gt; class</h3><p><a href="https://api.flutter.dev/flutter/material/PopupMenuButton-class.html"><em>Documentation</em></a></p><p>Also refer official class documentation with this guide to deeply understand the concept.</p><p>When this button is pressed, it displays a menu (pop-up menu).</p><p><strong>PopupMenuButton Class Constructor</strong></p><pre>PopupMenuButton({Key key, @required PopupMenuItemBuilder&lt;T&gt; itemBuilder, T initialValue, PopupMenuItemSelected&lt;T&gt; onSelected, PopupMenuCanceled onCanceled, String tooltip, double elevation, EdgeInsetsGeometry padding: const EdgeInsets.all(8.0), Widget child, Icon icon, Offset offset: Offset.zero, bool enabled: true, ShapeBorder shape, Color color })</pre><p><strong>Required Parameters</strong></p><ul><li>itemBuilder</li></ul><p><strong>Implementation</strong></p><ol><li>Create a list of popup menu items.</li><li>Main properties required for PopupMenuButton class implementation.</li></ol><ul><li>itemBuilder</li><li>onSelected</li><li>itemBuilder property will contain PopupMenuItem class implementation as shown below</li></ul><p>3. Main properties required to implement PopupMenuItem class</p><ul><li>value</li><li>child - Text Widget</li></ul><figure><img alt="PopupMenuButton Class Implementation" src="https://cdn-images-1.medium.com/max/1024/1*bl_NDL7xKrtCSmmLd6nMLg.png" /><figcaption>PopupMenuButton Class Implementation</figcaption></figure><p>let’s add some more properties like colors etc.</p><p>Refer official class documentation for property list</p><ul><li>icon property to change popup menu button</li><li>tooltip — text that describe the action that will occur when the button is pressed</li><li>onCanceled — the function defined here will be called when user dismisses popup menu without selecting any option</li></ul><figure><img alt="PopupMenuButton Class Properties" src="https://cdn-images-1.medium.com/max/1024/1*lL4t_98O4KsRy8l9a9k0mA.png" /><figcaption>PopupMenuButton Class Properties</figcaption></figure><p><strong>PopupMenuButton Sample Implementation - Add Settings Popup Menu Button</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YLSRaTWfjCAcZIFz28_lQg.png" /><figcaption>Settings PopupMenuButton</figcaption></figure><h3><strong>Coding - Sample Flutter App Code</strong></h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7bbaf9d3c89ca5420471d4d46cf426f9/href">https://medium.com/media/7bbaf9d3c89ca5420471d4d46cf426f9/href</a></iframe><p><strong>Bonus Tip : </strong>Also refer the following classes to improve your PopupMenu UI</p><ul><li>PopupMenuDivider : a popup menu entry that is just a horizontal line - <a href="https://api.flutter.dev/flutter/material/PopupMenuDivider-class.html">Documentation</a></li><li>CheckedPopupMenuItem : a popup menu item with a checkmark - <a href="https://api.flutter.dev/flutter/material/CheckedPopupMenuItem-class.html">Documentation</a></li></ul><p>There are two more classes using which we can implement button functionality :</p><ul><li>GestureDetector Class</li><li>InkWell Class</li></ul><p>We will learn the above two classes in Flutter Gestures Developer Guide.</p><p><em>Originally published at </em><a href="https://blog.akshatapp.com/2019/11/flutter-button-guide.html"><em>https://blog.akshatapp.com</em></a><em> on November 27, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f720a8d46688" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Icon Developer Guide]]></title>
            <link>https://akshatapp.medium.com/flutter-icon-developer-guide-244d4cfc5927?source=rss-5b6172ac26c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/244d4cfc5927</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[icons]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[AkshatApp]]></dc:creator>
            <pubDate>Thu, 21 Nov 2019 18:15:00 GMT</pubDate>
            <atom:updated>2022-08-10T15:08:28.615Z</atom:updated>
            <content:encoded><![CDATA[<p>This guide will help you implementing icons in your flutter app. <br>You will also learn some basics about color channels, alpha channel(transparency) etc.<br>In this guide will learn how to use :</p><ul><li>Flutter Icon Class (also known as Icon Widget) and Icons Class</li><li>Flutter ImageIcon Class and AssetImage Class</li></ul><figure><img alt="Flutter Icon Developer Guide" src="https://cdn-images-1.medium.com/max/960/1*TFhPWH3frVfFo2SZSsReMw.png" /><figcaption>Flutter Icon Developer Guide</figcaption></figure><h3>How to use Flutter Icon Widget or Flutter Icon Class ?</h3><p>Let us start with the simplest way to implement icons in flutter.</p><p>Icon Class - <a href="https://api.flutter.dev/flutter/widgets/Icon-class.html"><em>Documentation</em></a></p><p>Also refer official class documentation with this guide to deeply understand the concept.</p><h4>Icon Class Constructor</h4><pre>Icon(IconData icon, { Key key, double size, Color color, String semanticLabel, TextDirection textDirection })</pre><p>Create a child widget of Icon Class.</p><p>Now, To get the IconData, Use<strong> </strong><em>Material Icons Class - </em><a href="https://api.flutter.dev/flutter/material/Icons-class.html"><strong><em>Documentation</em></strong></a></p><p>In the below screenshot, we can clearly see that IntelliSense auto-completion recommends us a list of icons present in the Icons Class.</p><p>To know more about VS Code IntelliSense - Refer VS Code <a href="https://code.visualstudio.com/docs/editor/intellisense"><em>Docs</em></a></p><figure><img alt="Flutter - Icons Class" src="https://cdn-images-1.medium.com/max/1024/1*QAG0oZlKSR6D_NQOA5swOQ.png" /><figcaption>Flutter - Icons Class</figcaption></figure><p><strong>“info” icon selected for this demo guide</strong></p><figure><img alt="Info Icon" src="https://cdn-images-1.medium.com/max/735/1*b42N9ik0KozhQbLWqjJBEg.png" /><figcaption>Info Icon</figcaption></figure><p>Output : Flutter UI</p><figure><img alt="Flutter Info Icon UI" src="https://cdn-images-1.medium.com/max/1024/1*GDpKZuatBNNr2Ly_2gmr4w.png" /><figcaption>Flutter Info Icon UI</figcaption></figure><p><strong>We can also change different properties like color,size, semantic label and text direction</strong></p><p><strong>Icon class properties</strong></p><ul><li>icon : IconData [required]</li><li>color</li><li>size</li><li>semantic label</li><li>textDirection</li></ul><p><strong>What is Semantic Label ?</strong></p><ul><li>The text which will be announced in accessibility modes (example, TalkBack/VoiceOver).</li><li>This label will not be shown in the UI.</li></ul><figure><img alt="Flutter Semantic Label Icon" src="https://cdn-images-1.medium.com/max/913/1*89pTFW2okItHbWic5zeFgA.png" /><figcaption>Flutter Semantic Label Icon</figcaption></figure><p>Output : Flutter UI</p><figure><img alt="Flutter Icon Demo" src="https://cdn-images-1.medium.com/max/1024/1*N8uLK0D0dQ0jxbYX_GwfDQ.png" /><figcaption>Flutter Icon Demo</figcaption></figure><p>Recommended icon sizes(double value) are 15.0, 20.0, 25.0 and 50.0</p><p>This is the simplest way to implement icons in flutter app using Icon Class and Icons Class</p><h3>How to use ImageIcon Class ?</h3><p>Using this class (ImageIcon class) we can use our own custom designed images as icons in our flutter app.</p><p>ImageIcon Class Widget - <a href="https://api.flutter.dev/flutter/widgets/ImageIcon-class.html"><em>Documentation</em></a></p><p>Also refer official class documentation with this guide to deeply understand the concept.</p><h4>step 1: let us add our custom images to our flutter project</h4><ul><li>Create assets folder in your project directory</li><li>We have added two images into assets folder for this demo guide.</li><li>You may add images required for your project</li></ul><figure><img alt="Image Assets" src="https://cdn-images-1.medium.com/max/240/1*RnlwN8ULiJQ_R7b6OkfNEA.png" /><figcaption>Image Assets</figcaption></figure><p>Also, add the image assets to your application using <strong>pubspec.yaml</strong> file</p><figure><img alt="Flutter pubspec.yaml" src="https://cdn-images-1.medium.com/max/1024/1*vgDZSVv7rRSS5LEiXddj3w.png" /><figcaption>Flutter pubspec.yaml</figcaption></figure><h4>step 2 : Alpha Channel (Transparency)</h4><p>Let us first understand basics of image : color channels</p><p>Images have 4 color channels</p><ul><li>Red Channel</li><li>Green Channel</li><li>Blue Channel</li><li>Alpha Channel (Transparency)</li></ul><h4>Note</h4><p><strong><em>To use ImageIcon, we must have transparency — alpha channel in our custom images.</em></strong></p><ul><li>Use PNG images with alpha(transparency).</li><li>Do not use JPEG(.jpg or .jpeg) as it does not support transparency.</li></ul><p>We have added two images to our project, in step 1</p><p><strong>Image One : Image with white background named bluetruck.png</strong></p><figure><img alt="Image with white background" src="https://cdn-images-1.medium.com/max/946/1*nqwvaUZpVydTVd2YlFJg_w.png" /><figcaption>Image with white background</figcaption></figure><p><strong>Image Two : Image with transparent background — bluetruck alpha.png</strong></p><figure><img alt="Image with transparent background" src="https://cdn-images-1.medium.com/max/914/1*v3SM0VUkJ1xUkMSBSrJpiA.png" /><figcaption>Image with transparent background</figcaption></figure><h4>step 3 : Let us understand this with an example that why we must have transparency (alpha channel) in our images</h4><p>To implement the ImageIcon class, lets start with the ImageIcon class constructor</p><pre>ImageIcon(ImageProvider image, { Key key, double size, Color color, String semanticLabel })</pre><p>In this case, we do not have any IconData so we cannot use the Icons Class, instead we have ImageProvider.</p><p>for ImageProvider, use AssetImage classs [<a href="https://api.flutter.dev/flutter/painting/AssetImage-class.html">AssetImage Class Documentation</a>] to get your image.</p><p>Create a child widget named AssetImage and pass the relative image path</p><h4><strong>Case One : We use the image with white background (bluetruck.png)</strong></h4><figure><img alt="AssetImage White Background" src="https://cdn-images-1.medium.com/max/855/1*8lO2n_FfDn-7ZtQjV0_55Q.png" /><figcaption>AssetImage White Background</figcaption></figure><p>Output UI : for AssetImage with White Background</p><figure><img alt="Flutter AssetImage White Background UI" src="https://cdn-images-1.medium.com/max/1024/1*MIHQD4YXcAPJX58LCc3Z6Q.png" /><figcaption>Flutter AssetImage White Background UI</figcaption></figure><h4>Note</h4><p>We get a square box of red color because ImageIcon class traces and paints the icon borders.With a white background image it traces the complete square image path and paints it red as we have set color property as red.</p><p>But, this is not the desired result.</p><h4><strong>Case Two : We use the image with the transparent background (bluetruck alpha.png)</strong></h4><figure><img alt="Flutter AssetImage Transparent Background" src="https://cdn-images-1.medium.com/max/795/1*wo_8QqVQrTYC29ow1l3btw.png" /><figcaption>Flutter AssetImage Transparent Background</figcaption></figure><p>Output UI : for AssetImage with Transparent Background</p><figure><img alt="Flutter AssetImage Transparent Background UI" src="https://cdn-images-1.medium.com/max/1024/1*SW6_7TQpIZB0zsD-6-0eWw.png" /><figcaption>Flutter AssetImage Transparent Background UI</figcaption></figure><h4>Note</h4><p>Now, with the transparent background image we get the desired UI output of a truck icon using our custom image.</p><h4>Image Icon Class properties</h4><p>We can also change different properties like color,size, semantic label…</p><ol><li><strong>Change Icon Color to Green</strong></li></ol><figure><img alt="Flutter ImageIcon Green" src="https://cdn-images-1.medium.com/max/755/1*yf4eMg-KaUJziE9X0fmYsA.png" /><figcaption>Flutter ImageIcon Green</figcaption></figure><p>Output UI : Flutter Image Icon Color Green</p><figure><img alt="Flutter ImageIcon Green UI" src="https://cdn-images-1.medium.com/max/1024/1*V1GgNH5yOyCuwXb4y6OvoA.png" /><figcaption>Flutter ImageIcon Green UI</figcaption></figure><p><strong>2. Change icon size</strong></p><figure><img alt="Flutter ImageIcon Size" src="https://cdn-images-1.medium.com/max/707/1*l-YCoMT-UIyxc6bVo_PMFA.png" /><figcaption>Flutter ImageIcon Size</figcaption></figure><p>Output UI : Flutter Icon Size 50</p><figure><img alt="Flutter ImageIcon Size UI" src="https://cdn-images-1.medium.com/max/1024/1*8y9sk242WKk3jJEzYSs7pg.png" /><figcaption>Flutter ImageIcon Size UI</figcaption></figure><p><em>Using ImageIcon Class we can use our custom image icons.</em> <br>This is how we can implement icons in flutter app using ImageIcon Class and AssetImage Class.</p><h3>Coding : Sample Flutter App Code</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8a1600facf33a368421e2504f61bf7c5/href">https://medium.com/media/8a1600facf33a368421e2504f61bf7c5/href</a></iframe><p><strong>Bonus Tip </strong>: There is one more class for Interactive icons named IconButton. <br>But, we will learn about IconButton class in the our Flutter Button Developer Guide.</p><p><em>Originally published at </em><a href="https://blog.akshatapp.com/2019/11/flutter-icon-guide.html"><em>https://blog.akshatapp.com</em></a><em> on November 21, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=244d4cfc5927" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Publish your Flutter App - Android APK Signing and Release]]></title>
            <link>https://akshatapp.medium.com/publish-your-flutter-app-android-apk-signing-and-release-55af7d746348?source=rss-5b6172ac26c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/55af7d746348</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[AkshatApp]]></dc:creator>
            <pubDate>Wed, 20 Nov 2019 17:00:00 GMT</pubDate>
            <atom:updated>2020-12-31T18:52:26.167Z</atom:updated>
            <content:encoded><![CDATA[<p>In this guide we will learn how to sign the release version of APK or AAB (Android App Bundle) to publish our flutter app to android play store.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*JyzAmmOuPZSs9PYg.png" /></figure><figure><img alt="flutter release apk" src="https://cdn-images-1.medium.com/max/300/1*ptWf_8Oi-2Qq7JCEHAlbCg.png" /><figcaption>flutter release apk</figcaption></figure><h3>How to sign the APK or app bundle created using flutter ?</h3><p>To publish your app on Play Store, you need to give your app a digital signature.</p><h4>step 1 : Create a new keystore file ; if you have an existing keystore then skip this step</h4><ul><li>Run command in your terminal for linux/mac</li></ul><pre>keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key</pre><ul><li>On Windows, use the following command:</li></ul><pre>keytool -genkey -v -keystore c:/Users/USER_NAME/key.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias key</pre><ul><li>Fill in the required info inside the terminal</li></ul><pre>Enter keystore password: test@12345 <br>        Re-enter new password: test@12345<br>    <br>        What is your first and last name?<br>        [test]:  test<br>        What is the name of your organizational unit?<br>        [test]:  test<br>        What is the name of your organization?<br>        [test]:  test<br>        What is the name of your City or Locality?<br>        [test]:  test<br>        What is the name of your State or Province?<br>        [test]:  test<br>        What is the two-letter country code for this unit?<br>        [tt]:  tt<br>        Is CN=test, OU=test, O=test, L=test, ST=test, C=tt correct?<br>        [no]:  yes<br>        <br>//OUTPUT<br> Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 10,000 days<br>                for: CN=test, OU=test, O=test, L=test, ST=test, C=tt<br>        [Storing /home/&lt;user name&gt;/key.jks]</pre><ul><li>Keep the keystore file private; do not check it into public source control.</li><li>Always keep a backup of the keystore file.</li></ul><p><strong>Common errors while signing the app</strong></p><pre>Command &#39;keytool&#39; not found<br>run command :<br>sudo apt install openjdk-11-jre-headless<br>or <br>sudo apt install openjdk-8-jre-headless</pre><h4>step 2 : Reference the keystore from the app</h4><ul><li>Create a file name key.properties in your android folder</li></ul><p>Write the following lines inside the newly created file</p><pre>storePassword=&lt;password from previous step&gt;<br>keyPassword=&lt;password from previous step&gt;<br>keyAlias=key<br>storeFile=&lt;location of the key store file, such as /Users/&lt;user name&gt;/key.jks&gt;</pre><ul><li>Keep the key.properties file private; do not check it into public source control.</li><li>Always keep a backup of the key.properties file.</li></ul><h4>step 3 : Configure signing in gradle</h4><p>Navigate to /android/app/build.gradle file.</p><ol><li>Replace the following</li></ol><pre>android {</pre><p>with</p><pre>def keystoreProperties = new Properties()<br>   def keystorePropertiesFile = rootProject.file(&#39;key.properties&#39;)<br>   if (keystorePropertiesFile.exists()) {<br>       keystoreProperties.load(new FileInputStream(keystorePropertiesFile))<br>   }<br><br>   android {</pre><p>2. Replace the following</p><pre>buildTypes {<br>            release {<br>                // TODO: Add your own signing config for the release build.<br>                // Signing with the debug keys for now,<br>                // so `flutter run --release` works.<br>                signingConfig signingConfigs.debug<br>            }<br>        }</pre><p>with the signing config info</p><pre>signingConfigs {<br>       release {<br>           keyAlias keystoreProperties[&#39;keyAlias&#39;]<br>           keyPassword keystoreProperties[&#39;keyPassword&#39;]<br>           storeFile file(keystoreProperties[&#39;storeFile&#39;])<br>           storePassword keystoreProperties[&#39;storePassword&#39;]<br>       }<br>   }<br>   buildTypes {<br>       release {<br>           signingConfig signingConfigs.release<br>       }<br>   }</pre><p>Now, every release build of your app will be signed automatically</p><h4>step 4 : how to create APK file or Android App Bundle using flutter ?</h4><ul><li><strong>How to build an android app bundle (AAB) using flutter ?</strong></li></ul><p>Running flutter build defaults to a release build</p><pre>flutter build appbundle</pre><p>Note : release bundle for your app is created at /build/app/outputs/bundle/release/app.aab</p><ul><li><strong>How to build APK file using flutter ?</strong></li></ul><pre>flutter build apk</pre><p>Note : the above command “flutter build apk” builds a fat apk</p><p><strong>OR</strong></p><pre>flutter build apk --split-per-abi</pre><p>Note : the above command generated two APK files</p><ul><li>armeabi-v7a (32-bit) APK</li><li>arm64-v8a (64-bit) APK</li></ul><h4>Bonus Tip : Do not forget to :</h4><ul><li>Add a launcher icon to you app : <a href="https://blog.akshatapp.com/2019/11/android-app-icon.html">refer our icon guide - android app icon</a></li><li>Review App Manifest File, AndroidManifest.xml, located in &lt;app dir&gt;/android/app/src/main</li></ul><ol><li>Application Name [android : label in &lt;application&gt; tag]</li><li>uses-permission [Permission requested by your app]</li></ol><ul><li>Review the build configuration, Gradle build file, build.gradle, located in &lt;app dir&gt;/android/app</li></ul><p>Navigate to defaultConfig code block and verify</p><ol><li>applicationId - unique app id</li><li>versionCode &amp; versionName - Setting the version property in pubspec.yaml</li><li>minSdkVersion &amp; targetSdkVersion - API level on which your app is designed to run</li></ol><h3>Useful Resources</h3><p><a href="https://flutter.dev/docs/deployment/android">Flutter Official Docs - Deployment Guide</a></p><p>To learn more about flutter - <a href="https://www.akshatapp.com/tutorials/flutter-tutorial">Flutter Developer Guide</a></p><p><em>Originally published at </em><a href="https://blog.akshatapp.com/2019/11/flutter-release-apk.html"><em>https://blog.akshatapp.com</em></a><em> on November 20, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55af7d746348" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Color Developer Guide]]></title>
            <link>https://akshatapp.medium.com/flutter-color-developer-guide-1b5a91359dce?source=rss-5b6172ac26c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b5a91359dce</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[AkshatApp]]></dc:creator>
            <pubDate>Mon, 18 Nov 2019 17:30:00 GMT</pubDate>
            <atom:updated>2022-08-10T15:09:03.677Z</atom:updated>
            <content:encoded><![CDATA[<p>This guide will help you apply colors to your flutter apps using Flutter Material Colors Class and Flutter Dart:ui Color Class. You will also learn some basics about color channels, alpha channel, transparency etc.</p><figure><img alt="Flutter Color Developer Guide" src="https://cdn-images-1.medium.com/max/960/1*K1qoEntDYYkAvNF02CvaVg.png" /><figcaption>Flutter Color Developer Guide</figcaption></figure><p>Flutter uses two classes to paint colors on your app screen.</p><ul><li>Flutter Material Colors Class</li><li>Flutter Dart:ui Color Class</li></ul><p>To apply colors to our flutter app we must first learn about the above two classes.</p><h3>How to use Flutter Material Colors Class ?</h3><p>Flutter Material Colors Class :<strong><em> </em></strong><a href="https://api.flutter.dev/flutter/material/Colors-class.html"><strong><em>Documentation</em></strong></a></p><p>Also refer official class documentation with this guide to deeply understand the concept.</p><p>Let us start with the simplest way to apply colors to your flutter app widgets.</p><h4>1. Colors class - Use Color using COLOR NAME (class constants)</h4><pre>color : Colors.orange</pre><figure><img alt="colors class constants" src="https://cdn-images-1.medium.com/max/1024/1*plytt8-Io67pxJtwkNAq_A.png" /><figcaption>Colors Class Constants</figcaption></figure><figure><img alt="Flutter Orange Container" src="https://cdn-images-1.medium.com/max/1024/1*xqVr02Wa3vBWpbR-QFoVSg.png" /><figcaption>Orange Container Widget UI</figcaption></figure><h4>2. Colors class - Use Color using COLOR NAME &amp; COLOR SHADE</h4><ul><li>Color shade ranges from 100 to 900 in increment of one hundred</li><li>Color with shade 50 is also added to above range in some colors</li><li>Accent Colors have only shade values 100,200,400 and 700</li><li>Lower Shade Value = Pale Color</li><li>Higher Shade Value = Darker Color</li></ul><figure><img alt="Darker Orange Shade = Colors.orange[900]" src="https://cdn-images-1.medium.com/max/740/1*uaKuvOZ7isNEFAb6-Ai3hw.png" /><figcaption>Darker Orange Shade = Colors.orange[900]</figcaption></figure><p><strong>How to use color shade value ?</strong></p><ul><li>Colors.orange[900]</li><li>Colors.orange.shade900</li></ul><p>Both of the above methods have same output</p><figure><img alt="Colors.orange[900]" src="https://cdn-images-1.medium.com/max/1000/1*tJw9GsjUSH6dU0bKQ-gHPg.png" /><figcaption>Colors.orange[900]</figcaption></figure><figure><img alt="Colors.orange.shade900" src="https://cdn-images-1.medium.com/max/1006/1*9u2YJgPa5b1AA05VAezJYg.png" /><figcaption>Colors.orange.shade900</figcaption></figure><p><strong>Both the above methods have same output</strong></p><figure><img alt="Color Shade Orange 900 UI" src="https://cdn-images-1.medium.com/max/1024/1*pGy9UhEhzXZfRSbFvGyrew.png" /><figcaption>Color Shade Orange 900 UI</figcaption></figure><p>Note : Colors.orange is same as Colors.orange[500] or Colors.orange.shade500</p><h4>3. Colors class - Black and White Colors</h4><ul><li>We have separate set of constants for color black and color white</li><li>These colors are identified by their transparency and not shade values.</li></ul><p><em>Example</em></p><ul><li>Colors.black54 : pure black with 54 % opacity</li><li>Colors.black12 : pure black with 12 % opacity</li><li><strong>Lower Number : Transparent Color</strong></li><li><strong>Higher Number : Opaque Color</strong></li></ul><figure><img alt="White &amp; Black Colors" src="https://cdn-images-1.medium.com/max/784/1*M0ZKUOtvSAOM46_fzHoR_w.png" /><figcaption>White &amp; Black Colors</figcaption></figure><p>Note : Transparent Color : Colors.transparent constant [invisible]</p><h3>How to use Flutter Dart:UI Color Class ?</h3><p>Flutter Dart:UI Color Class : <a href="https://api.flutter.dev/flutter/dart-ui/Color-class.html"><strong><em>Documentation</em></strong></a></p><p>Also refer official class documentation with this guide to deeply understand the concept.</p><p>Let us first understand the basics of colors.</p><h3>Color channels</h3><ul><li>Red Channel</li><li>Green Channel</li><li>Blue Channel</li><li>Alpha Channel (Transparency)</li></ul><h3>Color Class Properties</h3><ul><li><a href="https://api.flutter.dev/flutter/dart-ui/Color/alpha.html"><strong><em>Alpha Property : Documentation</em></strong></a></li></ul><pre>- Alpha Channel of this Color is in 8 bit value</pre><pre>- 8 bit value mean range 0 to 255 (2 raise to 8 = 256)</pre><pre>- 0 means this color is fully transparent</pre><pre>- 255 means this color is fully opaque</pre><pre>- return type int</pre><p>8 bit value : 0 (transparent) to 255 (opaque)</p><ul><li><a href="https://api.flutter.dev/flutter/dart-ui/Color/opacity.html"><strong><em>Opacity Property : Documentation</em></strong></a></li></ul><pre>- Alpha channel of this color is in double value</pre><pre>- double value mean ranges from 0.0 to 1.0</pre><pre>- 0.0 means this color is fully transparent</pre><pre>- 1.0 means this color is fully opaque</pre><pre>- return type double</pre><p>double value : 0.0 (transparent) to 1.0 (opaque)</p><ul><li><a href="https://api.flutter.dev/flutter/dart-ui/Color/value.html"><strong><em>Value Property : Documentation</em></strong></a></li></ul><p>Color represented as 32 bit value</p><p>Bits are assigned as follows :</p><ul><li>Bits 0 to 7 Blue value (Blue Channel)</li><li>Bits 8 to 15 Green Value (Green Channel)</li><li>Bits 16 to 23 Red Value (Red Channel)</li><li>Bits 24 to 31 Alpha Value (Alpha Channel)</li></ul><h4><strong>Difference between Alpha and Opacity</strong></h4><p>Alpha sets alpha channel value in 8 bit value and Opacity sets alpha channel value in double</p><p><strong>Let us also understand what is 0xFFFFA726 ?</strong></p><figure><img alt="Orange Int Value" src="https://cdn-images-1.medium.com/max/717/1*g346DDCTbX5MU8MtnkVl4Q.png" /><figcaption>Orange Int Value</figcaption></figure><p><strong>In the common “hash syntax”, we represent color values as #FFA726</strong></p><p>Using the color picker tool, we got the same color which is Colors.orange[400] using the “hash syntax” <strong>#FFA726 (Ignore the 0xFF at the begining).</strong></p><p>If we convert hex code to decimal code we can get the RGB values : Refer RGB section in the above screenshot</p><ul><li>Red Channel FF (hex) equals 255 (decimal)</li><li>Green Channel A7 (hex) equals 167(decimal)</li><li>Blue Channel 26 (hex) equals 38(decimal)</li></ul><p>Thus, <strong>0xFFFFA726 is 0x FF(alpha) FF(red) A7(green) 26(blue)</strong></p><p>Now, we have understood all the basics of color values and color channels we can now proceed with implementation code of the constructors of the Color class</p><h3>Color Class Constructor</h3><h4>1. fromARGB Decimal (int) =&gt; Color.fromARGB(int a, int r, int g, int b)</h4><pre>color : Color.fromARGB (255,255,167,38) // fromARGB Decimal</pre><figure><img alt="ARGB int" src="https://cdn-images-1.medium.com/max/818/1*qKwciAtgai0NHxLcped7Og.png" /><figcaption>ARGB int</figcaption></figure><h4>2. fromARGB Hex</h4><p>Note : Add 0x to the value, for example, Green channel (hex) A7 will become 0xA7</p><pre>color : Color.fromARGB (0xFF,0xFF,0xA7,0x26) // fromARGB Hex</pre><figure><img alt="ARGB Hex" src="https://cdn-images-1.medium.com/max/865/1*hSVf5fqgq70QR3S53p-XDg.png" /><figcaption>ARGB Hex</figcaption></figure><h4>3. fromRGBO Decimal (int) =&gt; Color.fromRGBO(int r, int g, int b, double opacity)</h4><pre>color : Color.fromRGBO(255,167,38,1.0) // fromRGBO Decimal</pre><ul><li>O stands for opacity — refer above explained opacity property summary</li><li>double value — 0.0 (transparent) to 1.0 (opaque)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*3yi8wgappyUtj98jIL2hGg.png" /></figure><h4>4. Color - Color(int value) : 0xAARRGGBB</h4><ul><li>Get any color int value for example #FFA726</li><li>Add 0xFF to “hash syntax” FFA726 =&gt; 0xFFFFA726</li><li>0xFF added to hash syntax is the alpha channel FF(hex) =&gt; 255 (decimal) opaque color</li></ul><pre>color : Color(0xFFFFA726) // int value</pre><figure><img alt="Color Int Value" src="https://cdn-images-1.medium.com/max/599/1*AHOjYFkBFeGKfkh5aWsPmg.png" /><figcaption>Color Int Value</figcaption></figure><p><strong>Output UI Color for all above 4 constructor is same</strong></p><figure><img alt="Color Constructor Output" src="https://cdn-images-1.medium.com/max/1024/1*qFS1uHoE32sCtbJM1HyYdQ.png" /><figcaption>Color Constructor Output</figcaption></figure><h3>Coding : Sample Flutter App Code</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4f1405a9fb25676d87bc90082674a760/href">https://medium.com/media/4f1405a9fb25676d87bc90082674a760/href</a></iframe><h3>Useful Resources</h3><p>Learn more about colors at <a href="https://material.io/design/color/">Material Design Color System</a></p><p><em>Originally published at </em><a href="https://blog.akshatapp.com/2019/11/flutter-color-developer-guide.html"><em>https://blog.akshatapp.com</em></a><em> on November 18, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b5a91359dce" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>