<?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 Chamith Chathuka on Medium]]></title>
        <description><![CDATA[Stories by Chamith Chathuka on Medium]]></description>
        <link>https://medium.com/@chamithchathuka?source=rss-41eb30465e4f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*88Q8g353skxX7Y9oMqbECw.png</url>
            <title>Stories by Chamith Chathuka on Medium</title>
            <link>https://medium.com/@chamithchathuka?source=rss-41eb30465e4f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 08:05:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chamithchathuka/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[Hosting Flutter Web Applications on Firebase for Free with Generous Spark Plan]]></title>
            <link>https://medium.com/flutter-community/hosting-flutter-web-applications-on-firebase-for-free-with-generous-spark-plan-a87ef2aa8d0d?source=rss-41eb30465e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a87ef2aa8d0d</guid>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[firebasehosting]]></category>
            <category><![CDATA[flutter-web]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[pwa]]></category>
            <dc:creator><![CDATA[Chamith Chathuka]]></dc:creator>
            <pubDate>Sat, 24 Jul 2021 16:19:56 GMT</pubDate>
            <atom:updated>2021-07-28T01:14:34.706Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*0YErNR5trqDs5UeAlnY3Rw.png" /></figure><p>Dear Flutter enthusiasts,</p><p>In this article, I will be explaining how to Host a Flutter for web applications with minimum steps in less than 10 mins, thanks to Firebase and Firebase CLI.</p><p>If you can remain within below limits of free tier you can use storage up to 10 GB in total for free with data transfer up to 360MB per day. If you need to use more than below limits you will need to upgrade your plan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*AGuKVQn5Qgl0hWWaarWG7g.png" /><figcaption>Firebase hosting pricing info <a href="https://firebase.google.com/pricing">https://firebase.google.com/pricing</a></figcaption></figure><h3>Prerequisites</h3><p>You need to have</p><ul><li>A Google Account</li><li>Firebase project</li><li>Firebase CLI installed on your PC or Mac</li></ul><p>I assume you have already enabled web support in your project.</p><p>You will need to login to Firebase CLI with the below command</p><pre>firebase login</pre><p>Initialize Firebase on your flutter app</p><pre>firebase init</pre><p>Then you need to use arrow keys and select</p><p>Hosting: Configure and deploy Firebase Hosting Sites</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XMcsbCX237eFFrfDZEGzrA.png" /></figure><p>for the next prompts use below answers, If you are not using routing with URL paths. If you need routing enabled please select No for the second option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*AfoZMGped8TsJF4JH8I2Ow.png" /></figure><p>That’s all for Firebase Initialization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*Rc-XeC2yU39Z0Hg5GQqdbg.png" /></figure><p>Then You will have to build your Flutter for Web Project with the below command.</p><pre>flutter build web</pre><p>After project successfully built , you will be able see a folder called web inside your projects root directory, build folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*RncI1tS48D5ZEy4YbSTapg.png" /></figure><p>you will have to run the the below command 2 commands.</p><pre>firebase use --add</pre><p>You will need to select the project on from the available project list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*z40OBEhiu6FDrle9DylpRQ.png" /><figcaption>firebase use — add</figcaption></figure><p>As the final step run</p><pre>firebase deploy</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*k41W4OqMsyF2_2XuS58sfQ.png" /><figcaption>After Firebase Deploy command</figcaption></figure><p>That’s all. Congratulations! You have successfully deployed your web app.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FxUPOqo6E1XvWXwlCyQ%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FxUPOqo6E1XvWXwlCyQ%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExNnZmMGkybWQzMGxqbWNtejJvYWZzN2RtM2RlNXdnZjYxbjM2MzRnbiZlcD12MV9naWZzX2dpZklkJmN0PWc%2FxUPOqo6E1XvWXwlCyQ%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="246" frameborder="0" scrolling="no"><a href="https://medium.com/media/ab3d48bd3fbdcae6d99d106825df15e0/href">https://medium.com/media/ab3d48bd3fbdcae6d99d106825df15e0/href</a></iframe><p>Bonus Content for your knowledge.</p><p>You can visit this link and check your usage statics for the project.</p><p><a href="https://console.firebase.google.com/project/_/usage">https://console.firebase.google.com/project/_/usage</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Fz6S1X1dYyeCG5VAc-B8g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UtdUUML8sOquITZOugdScg.png" /></figure><h3>See you in another article…</h3><blockquote>Your claps will encourage me to write more articles in the future. If you have any questions or anything to be improved please write a comment in the comments section or send me an email — chamithc25@gmail.com</blockquote><p><a href="https://twitter.com/FlutterComm">JavaScript is not available.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a87ef2aa8d0d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/flutter-community/hosting-flutter-web-applications-on-firebase-for-free-with-generous-spark-plan-a87ef2aa8d0d">Hosting Flutter Web Applications on Firebase for Free with Generous Spark Plan</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[Dynamic Configurations for Your Flutter App]]></title>
            <link>https://chamithchathuka.medium.com/dynamic-configurations-for-your-flutter-app-82ab86211922?source=rss-41eb30465e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/82ab86211922</guid>
            <category><![CDATA[dynamic-configuration]]></category>
            <category><![CDATA[firebase-remote-config]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[getx]]></category>
            <category><![CDATA[firebase]]></category>
            <dc:creator><![CDATA[Chamith Chathuka]]></dc:creator>
            <pubDate>Mon, 16 Nov 2020 14:27:05 GMT</pubDate>
            <atom:updated>2020-11-16T14:27:05.348Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XsQ6CS6MgFJP1DCyZ5Trrw.png" /></figure><p>Dear Flutter enthusiasts, in this article I will be explaining on how to remotely change theme colours in your application using Flutter <a href="https://pub.dev/packages/get">GetX package</a> and <a href="https://firebase.google.com/docs/remote-config">Firebase Remote Config</a>. Furthermore, we will be discussing on how to use GetX to navigate easily without passing build context.</p><p>Please note there are many other approaches in achieving this such as using your own web service to store and fetch configuration details. Yet, I am using Firebase Remote Config as it provides an attractive and convenient dashboard and a plugin to use with flutter which drastically reduces development and testing time for both back-end and front-end.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FiqPaNd7ltmopbcswTo%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FiqPaNd7ltmopbcswTo%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FiqPaNd7ltmopbcswTo%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/29788ef1a47010a0ef2dfce902a804f8/href">https://medium.com/media/29788ef1a47010a0ef2dfce902a804f8/href</a></iframe><p>A brief introduction to Firebase Remote Config. According to <a href="https://firebase.google.com/docs/remote-config">Google Firebase official documentation</a>.</p><blockquote>Firebase Remote Config is a cloud service that lets you change the behavior and appearance of your app without requiring users to download an app update.</blockquote><p>Which means that we have the flexibility to change the application-related configuration on the go, which is an interesting feature as it reduces the requirement to ship a new release to change simple features such as colour, user display message, or even change a URL configuration in our application.</p><p>I highly recommend you to check out this simple video to understand the potential of Firebase Remote config if you are new to Firebase Remote Config.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F_CXXVFPO6f0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D_CXXVFPO6f0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F_CXXVFPO6f0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/22a320e0788bb68afecc4eebb7ba73f4/href">https://medium.com/media/22a320e0788bb68afecc4eebb7ba73f4/href</a></iframe><blockquote>Sample Project and Integration of GetX</blockquote><p>This section will explain about creating a simple application with two screens and integrating GetX into your project.</p><p>The other important element of this article is to get an idea about the basic functionalities of <a href="https://pub.dev/packages/get">GetX plugin</a>. GetX plugin is initially developed to provide ease of accessing context anywhere of your application and for simple routing. Recently, the Get plugin rapidly developed extending its functionalities to GetX which offers state management capabilities.</p><p>For this demo, we will be using the feature to change themes in GetX.</p><p>To Install GetX to your project please follow the instructions below <a href="https://pub.dev/packages/get/install">https://pub.dev/packages/get/install</a></p><p>In this article, I will be using version 3.15.0 as it is the latest version.</p><pre><strong>dependencies</strong>:<br>  <strong>get</strong>: ^3.15.0 //replace with the latest version</pre><p>Here, I have created a sample project with two screens on each screen. Replace your Flutter project’s main.dart with the below content.</p><p>The below code snippet will demonstrate how to change your application theme with existing configurations. When you click the button “Go to Page 2” (line 67–70) it will not only direct you to the screen2 it will also change the application theme to Theme.dark according to the given instructions in line 9.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4826577b94893b1094c1227f5ef038c3/href">https://medium.com/media/4826577b94893b1094c1227f5ef038c3/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ga-nPjK32c9fqIblmqn28Q.png" /><figcaption>Application Initial configurations for GetX</figcaption></figure><p>In line 4, we will be replacing Flutter default MaterialApp with GetMaterial App since we are going to use routes without context.</p><p>From line, 16 to 21 routing definitions are declared.</p><p>The below example will demonstrate how the GetX plugin made routing easier without using the context in a few lines of code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JojSHNuz1wb0-Qdym6mlrA.png" /><figcaption>Simple Routing with GetX</figcaption></figure><p>In line 6, we are instructing to route to page2 which will route to Page2 screen by simply calling</p><pre>Get.toNamed(<strong>&#39;/page2&#39;</strong>);</pre><blockquote>Let’s integrate Firebase to your Flutter Project</blockquote><p>Let’s integrate firebase into the project. It does not take more than 5 minutes if you carefully follow the instructions in the firebase official documentation.</p><p>Please visit the link below.</p><blockquote><a href="https://firebase.google.com/docs/flutter/setup">https://firebase.google.com/docs/flutter/setup</a></blockquote><p>Don’t forget to select the relevant Operating System in the documentation page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nGHL89AJLNn1WD5pAOTC8A.png" /></figure><p>It is always better to refer to the official documentation when integrating firebase as it reflects the latest changes in the process.</p><blockquote>Integrate Firebase Remote Config</blockquote><p>It is super easy.</p><p>Just add the remote config dependency to your pubspec.yaml file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*Ny3rmp90SPgml4vnfjhlbg.png" /><figcaption><a href="https://firebase.flutter.dev/docs/remote-config/overview/">https://firebase.flutter.dev/docs/remote-config/overview/</a></figcaption></figure><p>Run the below command after editing pubspec.YAML file.</p><pre>flutter pub get</pre><p>Let’s initialize remote config to your flutter project.</p><p>First Import remote config to main.dart</p><pre><strong>import</strong> &#39;package:firebase_remote_config/firebase_remote_config.dart&#39;;</pre><p>Initialize Remote Config</p><pre><strong>final</strong> RemoteConfig remoteConfig = <strong>await</strong> RemoteConfig.instance;</pre><p>Firebase keeps these configurations as key-value pairs. It is possible to have different data types such as string, int or boolean. Firebase remote config console also allows adding JSON objects as values.</p><p>It is required to save configuration default values in the application if it is not possible to fetch values from Firebase Remote Config.</p><p>These keys should be identical to the keys set in the Firebase console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NKsLsPUZj7NiI8nylwokow.png" /><figcaption>Set default values to firebase remote configuration keys</figcaption></figure><p>Use the below method to access the remote configuration values. This example demonstrates different types of data provided by Remote Config library in Flutter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yR3DmXicbHpEQoI6dBAKpQ.png" /></figure><p>There are 3 main themes provided by GetX out of the box. It possible to configure the default colours as it provides flexibility to customize from App bar to text colour of a button inside the Theme</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*owPDPO0egXA_47fPCpCXDA.png" /><figcaption>Get.changeTheme()</figcaption></figure><pre>Get.changeTheme()</pre><p>Is the method I have used to modify theme data as in the above code snippet.</p><p>There are a few changes that need to be changed inside the main method.</p><p>Add below two lines to the main method.</p><pre>WidgetsFlutterBinding.<em>ensureInitialized</em>();<br><strong>await </strong>setupRemoteConfig();</pre><p>The modified main method will be as below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/320ea22fc92f273ee2e22b1b4e3f9aca/href">https://medium.com/media/320ea22fc92f273ee2e22b1b4e3f9aca/href</a></iframe><p>This method is the complete method which I have implemented for Firebase Remote Configs and changes the Theme colours using the methods provided by the GetX Plugin</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/096d0e72d18916448c23288bd196245b/href">https://medium.com/media/096d0e72d18916448c23288bd196245b/href</a></iframe><p>Replace <a href="https://console.firebase.google.com/u/0/project/chamith-medium-demos/config">&lt;Your_project_name&gt;</a> with your project and go to</p><p>https://console.firebase.google.com/u/0/project/&lt;Your_project_name&gt;/config</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GxLzaRGPt1Fi1R8CTMoSbA.png" /><figcaption>Set values in firebase remote config console</figcaption></figure><p>Once you open your application, it will remotely fetch all your configuration details and apply them instantly.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl0G18BkChcRRctMZ2%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fseason-15-the-simpsons-15x9-l0G18BkChcRRctMZ2&amp;image=https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2Fl0G18BkChcRRctMZ2%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/41e68221183a806596a6e825cce23847/href">https://medium.com/media/41e68221183a806596a6e825cce23847/href</a></iframe><p>In the above example, I have only used Remote Config to change the colours of your app remotely. If you think deeply there are many other use cases where remote config will be helpful.</p><blockquote>Visit below link to download complete project</blockquote><p><a href="https://github.com/chamithchathuka/demo_flutter_remoteconfig_getx">https://github.com/chamithchathuka/demo_flutter_remoteconfig_getx</a></p><p>In this article, we have discussed how to,</p><blockquote>Integrate GetX and simple Routing with GetX.</blockquote><blockquote>How we can use GetX to modify the theme data of your application dynamically.</blockquote><blockquote>How to implement firebase and firebase remote config.</blockquote><blockquote>Using the Firebase Remote Config console and change app colours on the go.</blockquote><h3>See you in another article…</h3><blockquote><em>Your claps will encourage me to write more articles in the Future. If you have any questions or anything to be improved please write a comment in the comments section or send me an email — chamithc25@gmail.com</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82ab86211922" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Securing applications by selecting proper Authentication Flow with Microsoft Azure AD]]></title>
            <link>https://medium.com/axiata-digital-labs/securing-applications-by-selecting-proper-authentication-flow-with-microsoft-azure-ad-6543663cfe71?source=rss-41eb30465e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/6543663cfe71</guid>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[Chamith Chathuka]]></dc:creator>
            <pubDate>Fri, 03 Jul 2020 02:51:36 GMT</pubDate>
            <atom:updated>2020-07-03T02:51:36.140Z</atom:updated>
            <content:encoded><![CDATA[<p>This article is based on our approach to select the best authentication flow for integrating user authentication with Microsoft Azure AD to a separate Angular 9 frontend and a Spring boot backend application. I have thought of sharing the knowledge that we gathered as a team since we spent a considerable time on selecting the best approach for our application.</p><p>Before I proceed. I thought of sharing a fundamental concept.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BzdeK2hlmaQOOzMzh9IxFA.png" /><figcaption>Authentication vs Authorization</figcaption></figure><h3>OAuth 2.0 Terminology</h3><blockquote>OAuth 2.0 is an authorization framework that allows interchange and authorization policies across resources.</blockquote><p>OAuth terminology has several interacting elements.</p><p><strong>Resources: </strong>Protected resources, which required to be exposed in a controlled manner.</p><p><strong>User: </strong>The resource owner who grants permission to access some portion of the resource.</p><p><strong>Authorization Server: </strong>The authorization server evaluates policies.</p><p><strong>The Client: </strong>The client is the app that is attempting to act on the user’s behalf or access the user’s resources.</p><p><strong>Token: </strong>It is a string denoting a specific scope, lifetime, and other access attributes. The client uses tokens to access resources available on the server.</p><h3>OpenID Connect</h3><blockquote>Is an extended development on top of OAuth targeting single sign-on use cases and sharing user profile information.</blockquote><p>Our approach was involved in authenticating organization users. This approach is for integrating Microsoft Azure Active Directory with an Angular 9 front-end application with Spring boot backend application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*Ixyk1MoENRcJb-J6CxNhMA.png" /></figure><p>To be specific on above,</p><blockquote>Azure AD is to develop apps for organizations and their corporate users</blockquote><blockquote>Azure AD B2C is to develop apps for customers, like mobile apps, online shopping platforms, etc.</blockquote><p>We are using Azure AD since it allows user identification securely with the <a href="https://docs.microsoft.com/en-us/azure/active-directory-b2c/protocols-overview">OAuth 2.0 and OpenID Connect protocols</a>. which makes use of tokens. Tokens used in Azure AD are JSON web Tokens.</p><p>The following tokens are used in communication with Azure AD B2C:</p><p><strong>ID Token</strong></p><p>This token uses to identify users in our application. ID Tokens are signed and not encrypted. This token is securely sent in HTTP requests for communication between two components of the same application or service. Our application should validate the token.</p><p><strong>Access Token</strong></p><p>This token is used to access APIs and resource servers. Access tokens are signed, but they are also not encrypted.</p><p><strong>Refresh Token</strong></p><p>Refresh tokens are used to obtain new access and ID Tokens. Refresh token’s usage is to gain long-term access to resources on behalf of users without requiring interaction with those users. Application services save the refresh token when the access token is expired and Still, there is no guarantee that these refresh tokens are valid forever and application should manage as these tokens can be invalidated at any time.</p><blockquote>Selecting authentication flow for a service should be selected with care as choosing the most suitable flow will minimize associated security risks.</blockquote><p>There are several grant types available with <strong>Microsoft Authentication Library (MSAL).</strong></p><p><strong>Interactive Flow</strong></p><p>This process gets token through user login from User credentials through a browser or pop-up window.</p><p>Suitable for Desktop apps and mobile apps, some CLI apps which run on desktops also use this approach.</p><p><strong>Implicit Grant Flow</strong></p><p>It allows a single page app to get tokens without having a backend server. This library allows to handle user sign in, maintain sessions, manage tokens in a Single Page Application.</p><p><strong>Authorization Code Flow</strong></p><p>Regular web apps are server-side apps where the source code is not publicly exposed. They can use the Authorization Code Flow which exchanges an Authorization Code for a token. Your app must be server-side because, during this exchange, you must also pass along your application’s Client Secret. Which must always be kept secure, and you will have to store it in your client.</p><p>In the Authorization Code Flow client-side application( front channel) never receives access token immediately, it receives authorization code(Auth code). It is an onetime code used immediately, Only useful for seconds. Credentials also not handled by the Web application.</p><p>The web application uses the Authorization Code, the Client ID, and Client secret to access the token endpoint to obtain access and refreshes tokens. Since the entire flow is handled mostly by the backchannel. The client browser never sees Access Token or Refresh Tokens.</p><p>Since this process requires real user involvement we can’t use this for microservices.</p><p>This is not suitable for Mobile apps and Single Page apps as well they are not capable of holding client secrets, which is like the password for our application in Azure AD.</p><p><strong>Authorization Code Flow with PKCE </strong>(RFC 7636 Authorization Code Grant using Proof Key for Code Exchange)</p><p>PKCE is also a bit similar to Code flow but does not use Client secret as it is used for native mobile apps, which cannot keep the client key securely.</p><p>This flow is much more secure than using Implicit grant flow. When it generates a code challenge which is the Base64 encoded SHA256 hash of that code verifier. When you make the authorized request the application will send the code challenge and keep the code verifier secret. Assuming the authorization was successful the authorization server responds with the authorization code just as before. When the application exchanges the authorization code with the tokens it sends the code verifier in the request. The authorization server hashes and encodes the code verifier to compare against the original code challenge sent before. Since the verifier hasn’t been sent previously and they were never sent together, the server can assume the original authorized app is the one still making the requests.</p><p><strong>Client credentials</strong></p><p>This flow is mainly useful for applications that have no direct user interaction such as microservices. These services interact with the server to the server.</p><p><strong>Integrated Windows Authentication</strong></p><p>This allows applications on domains to acquire tokens silently without user UI interaction. This is only available on a domain or Azure AD with limitations.</p><p><strong>Username/password</strong></p><p>This not a recommended flow, yet some applications use this flow. This allows an application to log in to the user by directly handling the passwords.</p><p>To learn more about Microsoft Authentication Library provided Authentication flows please visit the below link.</p><p><a href="https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-authentication-flows">MSAL authentication flows - Microsoft identity platform</a></p><p>To Conclude, our approach for selecting Authentication Flow was Authorization Code flow, since it had both the front channel and backchannel.</p><p><strong>Risks associated with Native apps and Single Page Applications</strong></p><p><strong>Single-page apps</strong></p><p>It cannot securely store a Client Secret because the entire source is accessible through the browser.</p><p><strong>Native apps</strong></p><p>Decompiling the app will reveal the Client Secret, Cannot securely store a Client Secret. which is bound to the app and is the same for all users and devices.</p><h3>Why should we choose Authorization Code Flow for applications with a server backchannel?</h3><p>The main downside to the Implicit grant type is that the access token is returned to the browser, rather than being returned via a trusted back channel like in the <a href="https://developer.okta.com/blog/2018/04/10/oauth-authorization-code-grant-type">Authorization Code</a> flow. The access token itself will be logged in the browser’s history, so most servers issue short-lived access tokens to mitigate the risk of the access token being leaked. There is no backchannel, the Implicit flow also does not return a refresh token.</p><p>I hope this article will help you to select the best approach for our application when integrating with Azure AD.</p><blockquote>“People can like what you write, they can dislike it, they can love it, they can hate it, but it should not confuse anybody.”</blockquote><blockquote>Timothy Ferriss.</blockquote><p>Further reference,</p><p>Azure AD, B2B, B2C</p><p><a href="https://www.predicagroup.com/blog/azure-ad-b2b-b2c-puzzled-out/#:~:text=Azure%20AD%20B2C.-,Summary,a%20consumer%20application%20identity%20repository.">Azure AD, B2B, B2C Puzzled Out - What Makes The Difference?</a></p><p>MSAL Flows</p><p><a href="https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-authentication-flows#:~:text=MSAL%20supports%20the%20OAuth%202%20authorization%20code%20grant%20flow.,protected%20resources%20like%20web%20APIs.&amp;text=Requests%20an%20authorization%20code%2C%20which,to%20call%20a%20web%20API.">MSAL authentication flows - Microsoft identity platform</a></p><p>Authorization Code Flow</p><p><a href="https://auth0.com/docs/flows/concepts/auth-code">Authorization Code Flow</a></p><p>Implicit Grant Type</p><p><a href="https://oauth.net/2/grant-types/implicit/">OAuth 2.0 Implicit Grant Type</a></p><p>PKCE</p><p><a href="https://auth0.com/docs/flows/concepts/auth-code-pkce">Authorization Code Flow with Proof Key for Code Exchange (PKCE)</a></p><p>Client Credentials Flow</p><p><a href="https://tools.ietf.org/html/rfc6749#section-4.4">RFC 6749 - The OAuth 2.0 Authorization Framework</a></p><h3>See you in another article with implementation details …</h3><blockquote><em>Your claps will encourage me to write more articles in the future. If you have questions or anything to be corrected and improved please write a comment in the comments section or send me an email — chamith.chathuka@axiatadigitallabs.com</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6543663cfe71" width="1" height="1" alt=""><hr><p><a href="https://medium.com/axiata-digital-labs/securing-applications-by-selecting-proper-authentication-flow-with-microsoft-azure-ad-6543663cfe71">Securing applications by selecting proper Authentication Flow with Microsoft Azure AD</a> was originally published in <a href="https://medium.com/axiata-digital-labs">ADL BOSS Skunks</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Single Child Layout Widgets]]></title>
            <link>https://chamithchathuka.medium.com/flutter-layout-widgets-b137758d9d43?source=rss-41eb30465e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b137758d9d43</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-layout]]></category>
            <category><![CDATA[flutter-widget]]></category>
            <category><![CDATA[flutter-example]]></category>
            <dc:creator><![CDATA[Chamith Chathuka]]></dc:creator>
            <pubDate>Sun, 08 Sep 2019 06:49:00 GMT</pubDate>
            <atom:updated>2019-09-11T16:21:22.749Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QVuArrDbuqYnBpOPFgZQGA.jpeg" /></figure><p>When we start developing with Flutter it is essential to have good knowledge about Layout widgets as they help us to build amazing UIs with Flutter.</p><p>Since everything is a widget in Flutter, Layout can be also constructed through widgets.</p><p>There are 2 types of Layout Widgets in Flutter.</p><ul><li><a href="https://flutter.dev/docs/development/ui/widgets/layout#Single-child%20layout%20widgets">Single-child layout widgets</a></li><li><a href="https://flutter.dev/docs/development/ui/widgets/layout#Multi-child%20layout%20widgets">Multi-child layout widgets</a></li></ul><p>In this article, I am going to give a brief explanation about single child lists in Flutter.</p><p><strong>Single Child Layout Widgets</strong></p><p>As the name suggests, it can have only one child widget inside the parent layout widget.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*uqx4WVc3-3hXhLPyzMSo1A.png" /></figure><p>There are many single child layout widgets available in Flutter, all of them will make your life easier if you choose the correct widget according to your requirement. You don’t have to remember all widgets just in the beginning of flutter, but get the experience of the widgets about their appropriate usage.</p><p>Using Appropriate Widget will save your time, make the code more readable.</p><p>Here are some of the Single child Layout widgets.</p><p><a href="https://api.flutter.dev/flutter/widgets/Container-class.html">Container</a>| <a href="https://api.flutter.dev/flutter/widgets/Padding-class.html">Padding</a> | <a href="https://api.flutter.dev/flutter/widgets/Center-class.html">Center</a> | <a href="https://api.flutter.dev/flutter/widgets/Align-class.html">Align</a> | <a href="https://api.flutter.dev/flutter/widgets/SizedBox-class.html">SizedBox</a> | <a href="https://api.flutter.dev/flutter/widgets/AspectRatio-class.html">AspectRatio</a> | <a href="https://api.flutter.dev/flutter/widgets/Baseline-class.html">Baseline</a> | <a href="https://api.flutter.dev/flutter/widgets/ConstrainedBox-class.html">ConstrainedBox</a> | <a href="https://api.flutter.dev/flutter/widgets/CustomSingleChildLayout-class.html">CustomSingleChildLayout</a> | <a href="https://api.flutter.dev/flutter/widgets/FittedBox-class.html">FittedBox</a> |<a href="https://api.flutter.dev/flutter/widgets/FittedBox-class.html">FittedBox</a> |<a href="https://api.flutter.dev/flutter/widgets/FractionallySizedBox-class.html">FractionallySizedBox</a> |<a href="https://api.flutter.dev/flutter/widgets/IntrinsicHeight-class.html">IntrinsicHeight</a> | <a href="https://api.flutter.dev/flutter/widgets/IntrinsicWidth-class.html">IntrinsicWidth</a> |<a href="https://api.flutter.dev/flutter/widgets/LimitedBox-class.html">LimitedBox</a> |<a href="https://api.flutter.dev/flutter/widgets/Offstage-class.html">Offstage</a> | <a href="https://api.flutter.dev/flutter/widgets/OverflowBox-class.html">OverflowBox</a></p><p>Let’s have a brief understanding about some important widgets.</p><h3><strong>Container</strong></h3><p>This is the most popular layout style widget, this widget provides customizable options for size (Height and Width), painting and positioning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RRABv0OrcONyWliuwz-Hog.png" /><figcaption>Container screenshot (cropped)</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/963376513154b464240c20e273c9d862/href">https://medium.com/media/963376513154b464240c20e273c9d862/href</a></iframe><h3><strong>Decorations with Container</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h0b4DmYebzFx9gm9A8QlBw.png" /><figcaption>Container decorations screenshot</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/503d559ef5e1c1c0c92dbaebb2262aaa/href">https://medium.com/media/503d559ef5e1c1c0c92dbaebb2262aaa/href</a></iframe><h3>Padding</h3><p>This Widget help to build the layout by adding Padding to its child widget.</p><pre>Padding(<br>  padding: EdgeInsets.all(20.0),<br>  child: Container(<br>    height: 200.0,<br>    width: double.<em>infinity</em>, // expand in one dimension<em><br>    </em>color: Colors.<em>teal</em>,<br>  ),<br>),</pre><p>Use EdgeInsets class to have padding for the desired side as you wish, Here in the example we have added padding all around the child widget which required padding.</p><p>instead, you can use “EdgeInsets.fromLTRB” where you have more control over the padding for the child widget. Arguments should be passed int the following order as the name suggests.</p><p>LEFT, TOP,RIGHT,BOTTOM</p><pre>padding: EdgeInsets.fromLTRB(20,5,20,8),</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*exU5ky7qhQ0stsOLcbe_3g.png" /><figcaption>Different Methods available with EdgeInsets</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IRYlLF8eGNuR_x8KqrV3dg.png" /><figcaption>Padding Example</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a9f0962a3269c1eea5d7b46ecddbd2fa/href">https://medium.com/media/a9f0962a3269c1eea5d7b46ecddbd2fa/href</a></iframe><h3>Center</h3><p>You can center the child widget with the Center widget.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IVY5h0nJ3ZsjmgkvR_KPsQ.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/963376513154b464240c20e273c9d862/href">https://medium.com/media/963376513154b464240c20e273c9d862/href</a></iframe><h3>Align</h3><p>With Align Class you will have more control over the exact position of the child widget. It allows place the child widget in the exact place you need.</p><blockquote>A widget that aligns its child within itself and optionally sizes itself based on the child’s size.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*3WToI6ux8_nUcoKf1WzQgg.png" /><figcaption>Alignment options</figcaption></figure><pre>Container(<br>  height: 200,<br>  width: double.<em>infinity</em>,<br>  color: Colors.<em>indigo</em>,<br>  child: Align(<br>    alignment: Alignment.<em>bottomCenter</em>,<br>    child: Container(<br>      color: Colors.<em>teal</em>,<br>      height: 100,<br>      width: 100,<br>    ),<br>  ),<br>),</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*cBwmC7wQZlBTXDfn47_pZA.png" /><figcaption>Available Alignment Options</figcaption></figure><p>Check the code for <a href="https://gist.github.com/chamithchathuka/c34d897f208634bff8b4e7c040bf7b01">Align Example Here</a>.</p><h3>SizedBox</h3><p>Use Sized box if you need to have exact same height and width to the child widget through all screens.</p><blockquote>A box with a specified size.</blockquote><pre>SizedBox(<br>  width: 300.0,<br>  height: 300.0,<br>  child: Container(<br>    color: Colors.<em>teal</em>,<br>    child: Center(<br>      child: Text(<br>        <strong>&#39;Hello World!&#39;</strong>,<br>        style: TextStyle(color: Colors.<em>white</em>),<br>      ),<br>    ),<br>  ),<br>),</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M_Dcu76hatthTnQHy1q2qg.png" /></figure><p>Check out this video for more info.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FEHPu_DzRfqA%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DEHPu_DzRfqA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FEHPu_DzRfqA%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b0089463b6a8becff844cfb0c2619fb6/href">https://medium.com/media/b0089463b6a8becff844cfb0c2619fb6/href</a></iframe><h3>AspectRatio</h3><blockquote>A widget that attempts to size the child to a specific aspect ratio.</blockquote><p>Regardless of the exact dimensions, it tries to keep the aspect ratio of its’ child widget in the given aspect ratio.</p><h4>aspect ratio : width/height</h4><pre>AspectRatio(<br>  aspectRatio: 3/2,<br>  child: Container(<br>    color: Colors.<em>teal</em>,<br>  ),<br>),</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cd107c3d9f024811b4a1f7889e584e2f/href">https://medium.com/media/cd107c3d9f024811b4a1f7889e584e2f/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FXcnP3_mO_Ms%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXcnP3_mO_Ms&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FXcnP3_mO_Ms%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1ed3a297b0a3e35ea3eb2fc58bc63336/href">https://medium.com/media/1ed3a297b0a3e35ea3eb2fc58bc63336/href</a></iframe><h3><strong>Baseline</strong></h3><blockquote>A widget that positions its child according to the child’s baseline.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*23WByZ8_gq2ze_hElPbDvw.png" /><figcaption>Baseline screenshot</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/874168318ddde3f2f1c2b3374fd79300/href">https://medium.com/media/874168318ddde3f2f1c2b3374fd79300/href</a></iframe><p>For more information about Baseline widget visit <a href="https://api.flutter.dev/flutter/widgets/Baseline-class.html">this link</a></p><h3><strong>ConstrainedBox</strong></h3><blockquote>A widget that force additional constraints on its child.</blockquote><p>Use this widget if you want to force your child widget to have specific constraints without changing properties of the child widget.</p><pre>ConstrainedBox(<br>  constraints: BoxConstraints(maxHeight: 50.0) ,<br>  child: Container(<br>        color: Colors.<em>teal</em>,<br>      ),<br>),</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pNWzOg0oEedBNbJuF8hSJA.png" /><figcaption>Constrained Box Example</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ec76034d0223191b734441d90b5d52c2/href">https://medium.com/media/ec76034d0223191b734441d90b5d52c2/href</a></iframe><p>There are many other Single Child Layout widgets available in Flutter. Using the correct widget will help you to reduce the development time, the code will be more readable.</p><h3>See you in another article…</h3><blockquote>Your claps will encourage me to write more articles in the Future. If you have any questions or anything to be improved please write a comment in the comments section or send me an email — chamithc25@gmail.com</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b137758d9d43" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with Flutter]]></title>
            <link>https://chamithchathuka.medium.com/getting-started-with-flutter-c7109c412b2e?source=rss-41eb30465e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7109c412b2e</guid>
            <category><![CDATA[material-design]]></category>
            <category><![CDATA[flutter-widget]]></category>
            <category><![CDATA[cupertino]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Chamith Chathuka]]></dc:creator>
            <pubDate>Mon, 26 Aug 2019 07:57:29 GMT</pubDate>
            <atom:updated>2019-08-26T13:20:32.602Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0l8XRJrBjcoGD3pHAKwoSg.jpeg" /></figure><p>Let&#39;s get started with “hello world” example for Flutter.</p><p>It does n’t matter whether you are using Mac or Windows, open Android Studio if you have already installed all prerequisites which I explained in my previous article.</p><p>Follow below simple steps to create a new Flutter Application Project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-9qOnI_GvoHlNrWMDS8P3g.png" /><figcaption>Steps to Create Flutter Project</figcaption></figure><h3><em>Step 1</em></h3><p>Select “Start a new Flutter Project” (1st Screenshot in above Image).</p><h3><em>Step 2</em></h3><p>Select a “Flutter application”.</p><h3><em>Step 3</em></h3><p>Android Studio may automatically detect the Flutter SDK path. if not please locate the unzipped flutter SDK location in Flutter SDK, probably the SDK will be available in the downloads section but better move it to a proper place.</p><p>Choose a location for the project.</p><h3>Step 4</h3><p>Type a domain name related to you, it doesn’t require to exist in real life. I just typed xeniq.lk as my domain and Android Studio automatically created package name for me based on the project name and the domain name that I typed.</p><p><strong>Platform Channel Language</strong></p><p>It depends on you if you are having previous experience with Kotlin and you prefer Kotlin over Java you can select Kotlin for Android Project. I have java experience and check the checkbox to add support for Kotlin.</p><p>I have no experience with ObjectiveC or Swift but for me, Swift is easier than ObjectiveC, if you are completely new for both languages select the checkbox to add support for Swift.</p><h3>Project Structure</h3><p>You will see the directories with following names ios, android, lib and test.</p><p><strong>android</strong></p><p><strong>android native project will be located in this directory.</strong></p><p><strong>ios</strong></p><p>IOS related native project will be located here.</p><p><strong>lib</strong></p><p>Where you will have to place all .dart files related to the Flutter project.</p><p><strong>pubspec.yaml</strong></p><blockquote><em>The pubspec.yaml file is the most important file in any Flutter project. It is the place where you provide all the required dependencies of your Flutter project</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*yyoNIpoHSn8JtTmu51O2nA.png" /><figcaption>Project Structure</figcaption></figure><p>Let&#39;s Explore the main.dart with much simpler code.</p><p>Replace the main.dart your content with below code.</p><pre><strong>import </strong>&#39;package:flutter/material.dart&#39;;<br><br><strong>void </strong>main(){<br>  <strong>return </strong>runApp(MyApp());<br>}<br><br><br><strong>class </strong>MyApp <strong>extends </strong>StatelessWidget {<br>  @override<br>  Widget build(BuildContext context) {<br>    <strong>return </strong>MaterialApp(<br>      title: &#39;Flutter for Beginners&#39;,<br>      home: Scaffold(<br>        appBar: AppBar(<br>          title: Text(&#39;Welcome to Flutter for Beginners.&#39;),<br>        ),<br>        body: Text(&#39;Hello World&#39;),<br>      ),<br>    );<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DKTCdfs98YIvB6umJHcZPA.png" /></figure><p>Since almost everyone have prior experience with Java, I made the flutter hello world</p><p>code similar to Java.</p><p>In the Top where you have the main method of your application.</p><p>we need to return a Cupertino Widget or a Material Widget to <strong>runApp method</strong> to show the related widget on the screen. Otherwise, it will not show anything.</p><p><strong>What is Material Design?</strong></p><blockquote>Material Design is a visual language that synthesizes the classic principles of good design with the innovation of technology and science.</blockquote><p>according to the <a href="https://material.io/design/introduction/">material.io</a>.</p><p>Flutter provides a rich set of widgets following the material guidelines.</p><h3>Working Style with Material UI (Android Style)</h3><p>If we want to use material style widgets we should build and return the application with</p><pre>return MaterialApp();</pre><p>and also import the material package from Flutter.</p><pre><strong>import </strong>&#39;package:flutter/material.dart&#39;;</pre><h3>Working with Cupertino UI (iOS Style)</h3><pre>import &#39;package:flutter/cupertino.dart&#39;;</pre><pre><strong>void </strong>main(){<br>  <strong>return </strong>runApp(MyApp());<br>}<br><br><br><strong>class </strong>MyApp <strong>extends </strong>StatelessWidget {<br>  @override<br>  Widget build(BuildContext context) {<br>    <strong>return </strong>CupertinoApp(<br>      title: &#39;Flutter for Beginners&#39;,<br>      home: CupertinoPageScaffold(<br>        navigationBar: CupertinoNavigationBar(<br>          middle: Text(&#39;Welcome to Flutter for Beginners.&#39;),<br>        ),<br>        body: Text(&#39;Hello World&#39;),<br>      ),<br>    );<br>  }<br>}</pre><p>If you want to iOS style widgets we can return CupertinoApp instead of a MaterialApp As you can see the widget names are different from each other.</p><p>Here are some of the differences in the above example.</p><pre><a href="https://api.flutter.dev/flutter/material/MaterialApp-class.html">MaterialApp </a> &gt; <a href="https://api.flutter.dev/flutter/cupertino/CupertinoApp-class.html">CupertinoApp</a></pre><pre><a href="https://api.flutter.dev/flutter/material/Scaffold-class.html">Scaffold</a>    &gt; <a href="https://api.flutter.dev/flutter/cupertino/CupertinoPageScaffold-class.html">CupertinoPageScaffold</a></pre><p>Material Design has an App Bar but Cupertino Design has a Navigation bar.</p><figure><img alt="Cuppertino Navigation bar" src="https://cdn-images-1.medium.com/max/640/0*Lmkzlq9w0bzvDuTE.png" /><figcaption>Cupertino Navigation bar</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*Swn_SWyYKlzI_atAwiqXuA.png" /><figcaption>Material App bar</figcaption></figure><p>A widget’s main job is to provide a build() a method that describes how to display the widget in terms of other, lower-level widgets.</p><p>If we want to use a Label in flutter we could simply use a Text widget.</p><pre>Text(&#39;Welcome to Flutter for Beginners.&#39;)</pre><p>From dart 2.0 it is optional to use the new keyword for new widgets see the post <a href="https://medium.com/dartlang/announcing-dart-2-80ba01f43b6#da82">here</a>.</p><p>That’s it for hello world.. see you in next article, please comment if you have any suggestions or missing explanation in comments section. Your claps will encourage me for my next article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7109c412b2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Free Software Resources for Students]]></title>
            <link>https://chamithchathuka.medium.com/free-software-resources-for-students-248f00be4865?source=rss-41eb30465e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/248f00be4865</guid>
            <category><![CDATA[free-software]]></category>
            <category><![CDATA[aws-educate]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[office-365]]></category>
            <category><![CDATA[students]]></category>
            <dc:creator><![CDATA[Chamith Chathuka]]></dc:creator>
            <pubDate>Mon, 14 Jan 2019 17:18:57 GMT</pubDate>
            <atom:updated>2019-01-16T03:19:16.811Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hM8rUwr3RUL3t1NwmCWI3w.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/XkKCui44iM0?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Priscilla Du Preez</a> on <a href="https://unsplash.com/search/photos/student?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>I got this idea of sharing this when I saw a <a href="https://medium.com/u/10c1e6d8c265">Poojã Bhaumik</a>’s <a href="https://www.linkedin.com/feed/update/urn:li:activity:6490294839878488064/">LinkedIn Post</a> about the cost of purchasing genuine software for students.</p><p>We should pay and buy genuine software but may be as student you might not be able to bare the cost.</p><p>There are so many resources for you as a student you will get instead of using pirate software.</p><p>Only thing you have to keep in mind is use that softwares</p><p>Only thing is to have a valid student email address provided with your university ID.</p><h3>OFFICE 365</h3><p>Microsoft Offers Office 365 for Students and Teachers for Free.</p><p><a href="https://products.office.com/en-us/student/office-in-education?rtc=1">Office for Students, Teachers, &amp; Schools</a></p><h3>JetBrains Student Pack</h3><p>Jet brains provides below application bundle for 1 year, you can request with student ID, you will have to renew the license each year.</p><p>Click on the below Banner to go directly to Jetbrains students offer page</p><p><a href="https://www.jetbrains.com/student/">For Students: Free Professional Developer Tools by JetBrains</a></p><p><strong>ReSharper Ultimate</strong></p><p>ReSharper, ReSharper C++, dotCover, dotTrace and dotMemory bundled in one license.</p><p><strong>IntelliJ IDEA Ultimate</strong></p><p>A complete toolset for JVM-based web, mobile and enterprise development</p><p><strong><em>AppCode </em></strong><em>Smart iOS/macOS IDE</em></p><p><strong><em>CLion </em></strong><em>Cross-platform C/C++ IDE</em></p><p><strong><em>DataGrip </em></strong><em>Database and SQL IDE</em></p><p><strong><em>GoLand </em></strong><em>Capable and Ergonomic Go IDE</em></p><p><strong><em>PhpStorm </em></strong><em>IDE for Web &amp; PHP</em></p><p><strong><em>PyCharm </em></strong><em>Powerful Python &amp; Django IDE</em></p><p><strong><em>Rider </em></strong><em>Cross-platform .NET IDE</em></p><p><strong><em>RubyMine </em></strong><em>IDE for Ruby and Rails</em></p><p><strong><em>WebStorm </em></strong><em>Smart JavaScript IDE</em></p><h3>Github Student Pack</h3><p>Github also give students free access to the best developer tools in one place, not only Github, but also provides many professional softwares and Cloud Service Credits for Students to get hands on experience.</p><p><a href="https://education.github.com/pack">GitHub Student Developer Pack</a></p><p>Github Offers Unlimited Private Repositories for Students which normally costs $5 per month which comes handy for your University Projects. Github works great along with Github Desktop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*zvwgIycD5ePCTv1fUNdeJg.png" /><figcaption><a href="https://github.com/">www.github.com</a></figcaption></figure><p><em>Powerful collaboration, code review, and code management</em></p><p><em>Benefit Unlimited free public and private repositories.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*nOpZh3JO-JQbfGr7.jpg" /><figcaption><a href="https://www.awseducate.com/">https://www.awseducate.com/</a></figcaption></figure><p><em>Access to the AWS cloud, free training, and collaboration resources Benefit GitHub Student Developer Pack members receive up to $110 in bonus AWS credits for a total of $75-$150</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-0ZEoJbMXMKb0zYxm1BkIQ.png" /><figcaption><a href="https://stripe.com/">https://stripe.com</a></figcaption></figure><p><em>Web and mobile payments, built for developers Benefit Waived transaction fees on first $1000 in revenue processed</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/0*s6zFKTjCjAp7RwHv.jpg" /><figcaption><a href="https://www.algolia.com/">https://www.algolia.com/</a></figcaption></figure><p><em>Hosted search API that provides support from front end to back end frameworks and libraries. Benefit 100k records and 1 million operations (normally $150/month), valid for 1 year.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*7InBwQFxbs7r6Gij.jpg" /><figcaption><a href="https://www.namecheap.com/">https://www.namecheap.com/</a></figcaption></figure><p>Affordable registration, hosting, and domain management Benefit One year SSL certificate (normally $9/year) Benefit One year domain name registration on the .me TLD (normally $18.99/year)</p><p>Above are few offers provided with Github StudentPack visit above links to register and more information.</p><p>If you learn something new don’t forget to clap, which encourages me to share something useful to the world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=248f00be4865" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>