{"id":15744,"date":"2020-07-06T11:46:56","date_gmt":"2020-07-06T11:46:56","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=15744"},"modified":"2020-09-02T17:49:08","modified_gmt":"2020-09-02T17:49:08","slug":"what-is-flutter-and-how-to-use-it-for-app-development","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/what-is-flutter-and-how-to-use-it-for-app-development\/","title":{"rendered":"What is flutter and how to use it for app development?"},"content":{"rendered":"\n<p><a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/flutter.dev\/\" target=\"_blank\" rel=\"noreferrer noopener\">Flutter<\/a> is Google&#8217;s portable UI (user interface) framework for producing modern, native and reactive mobile(Android, iOS) application, Web and desktop from a single codebase. <br>Flutter is an open-source project hosted on <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/github.com\/flutter\/flutter\" target=\"_blank\" rel=\"noreferrer noopener\">Github<\/a>. It contributed by Google and the <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/flutter.dev\/community\" target=\"_blank\" rel=\"noreferrer noopener\">community<\/a> . Flutter uses Dart language that compiles to native ARM code and production-ready JavaScript code. <\/p>\n\n\n\n<p>Flutter is fast, and the rendering runs at 60 fps (frames per second) and 120fps for capable devices. The higher the fps, the smoother the animations and transitions.<\/p>\n\n\n\n<p>Flutter provides tools to create beautiful and professional-looking applications to the developer and designers. Flutter have the function of hot reload to refresh the application in milliseconds when you are editing the application for adding new features in your existing app or new ones.<\/p>\n\n\n\n<p>Flutter is built with C, C++, Dart and Skia (2D rendering engine ). Skia works with different types of hardware and software platforms. It is also used by Google Chrome, Chrome OS, Android, Mozilla Firefox and Firefox OS. Skia is sponsored and managed by Google.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">How to setup Flutter environment in Windows ?<\/h4>\n\n\n\n<ol class=\"wp-block-list\"><li>Installing Flutter SDK from official <em><a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/flutter.dev\/docs\/get-started\/install\/windows\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/flutter.dev\/docs\/get-started\/install\/windows<\/a><\/em> <\/li><li>Extract file at this location <strong>C:\\src<\/strong> in your PC <\/li><li>Add the Flutter tool to your path at system environment<ol><li>copy this location <strong>C:\\src\\flutter\\bin<\/strong> <\/li><li>open system environment then click on <strong>Environment Variables..<\/strong> button<\/li><li>Click on Path and then click on Edit Button <\/li><li>then click on new button and add <strong>C:\\src\\flutter\\bin<\/strong> location and click on Ok =&gt; OK  =&gt; Ok<\/li><\/ol><\/li><li>Now open Windows PowerShell or CMD and Run <strong>flutter doctor<\/strong> to check every thing working fine or not. <\/li><\/ol>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"776\" height=\"115\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/flutter-extracted-file-in-c-location.jpg\" alt=\"\" class=\"wp-image-15747\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/flutter-extracted-file-in-c-location.jpg 776w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/flutter-extracted-file-in-c-location-300x44.jpg 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/flutter-extracted-file-in-c-location-768x114.jpg 768w\" sizes=\"auto, (max-width: 776px) 100vw, 776px\" \/><figcaption><strong>3-1. Extract Flutter SDK in C Driver under src folder<\/strong><\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"414\" height=\"468\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/system-properties-windows-1.jpg\" alt=\"\" class=\"wp-image-15749\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/system-properties-windows-1.jpg 414w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/system-properties-windows-1-265x300.jpg 265w\" sizes=\"auto, (max-width: 414px) 100vw, 414px\" \/><figcaption><strong>3-2. Environment Variables.<\/strong><\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"616\" height=\"584\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/environment-variables-popup.jpg\" alt=\"\" class=\"wp-image-15750\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/environment-variables-popup.jpg 616w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/environment-variables-popup-300x284.jpg 300w\" sizes=\"auto, (max-width: 616px) 100vw, 616px\" \/><figcaption><strong>3-3. Select Path and click on Edit Button.<\/strong><\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"529\" height=\"508\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/edit-environment-variables-popup.jpg\" alt=\"\" class=\"wp-image-15751\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/edit-environment-variables-popup.jpg 529w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/edit-environment-variables-popup-300x288.jpg 300w\" sizes=\"auto, (max-width: 529px) 100vw, 529px\" \/><figcaption><strong>3-4. Click on New Button and Add Location<\/strong><\/figcaption><\/figure><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"899\" height=\"488\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/flutter-doctor-command-in-powershell-window.jpg\" alt=\"\" class=\"wp-image-15752\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/flutter-doctor-command-in-powershell-window.jpg 899w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/flutter-doctor-command-in-powershell-window-300x163.jpg 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/flutter-doctor-command-in-powershell-window-768x417.jpg 768w\" sizes=\"auto, (max-width: 899px) 100vw, 899px\" \/><figcaption><strong>4. PowerShell Window to Check Flutter dependencies<\/strong><\/figcaption><\/figure>\n\n\n\n<p>After above following steps you have to install Android Studio<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Install Android Studio<\/h3>\n\n\n\n<p><strong>Step 1<\/strong> : Download and install <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/developer.android.com\/studio\" target=\"_blank\" rel=\"noreferrer noopener\">Android Studio<\/a><\/p>\n\n\n\n<p><strong>Step 2<\/strong> : after download click on software and go through Android Studio Setup Wizard<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1010\" height=\"441\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/android-studio-official-website.jpg\" alt=\"\" class=\"wp-image-15753\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/android-studio-official-website.jpg 1010w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/android-studio-official-website-300x131.jpg 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/android-studio-official-website-768x335.jpg 768w\" sizes=\"auto, (max-width: 1010px) 100vw, 1010px\" \/><figcaption><strong>Android Studio Offical website <\/strong><\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Setup your Android Device<\/h3>\n\n\n\n<p>Run and Test your flutter app in your android device, you need and Android device running Android 4.1 or Higher.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Open your Android device Settings<\/li><li>go to <strong>About Phone<\/strong> and then click on 2-3 times on <strong>Build Number<\/strong> (according to different android device setting view can be changed so <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/developer.android.com\/studio\/debug\/dev-options\" target=\"_blank\" rel=\"noreferrer noopener\">Click Here<\/a>  for detailed about USB Debugging setup)<\/li><li>after clicking you will see a popup that you are a developer now.<\/li><li>then go back and click on <strong>System<\/strong> and click on <strong>Developer options<\/strong><\/li><li>scroll and see under Debugging Tab a option named USB debugging then click on it.<\/li><li>Now connect your <em>Android device<\/em> to PC and you will see a popup in your device , just click on Ok.<\/li><li>run <em>flutter doctor<\/em> to see your device is connected or not.<\/li><\/ol>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/settings-android-device-576x1024.jpeg\" alt=\"\" class=\"wp-image-15754\" width=\"258\" height=\"457\"\/><figcaption><strong>Step 1<\/strong> : About Phone Button<\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/android-device-aboutphone-section-576x1024.jpeg\" alt=\"\" class=\"wp-image-15755\" width=\"260\" height=\"463\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/android-device-aboutphone-section-576x1024.jpeg 576w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/android-device-aboutphone-section-169x300.jpeg 169w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/android-device-aboutphone-section.jpeg 720w\" sizes=\"auto, (max-width: 260px) 100vw, 260px\" \/><figcaption><strong>Step 2<\/strong> : About Phone Options<\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/system-view-576x1024.jpeg\" alt=\"\" class=\"wp-image-15756\" width=\"267\" height=\"473\"\/><figcaption><strong>Step 3<\/strong> : Developer options<\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/developer-option-view-576x1024.jpeg\" alt=\"\" class=\"wp-image-15758\" width=\"266\" height=\"472\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/developer-option-view-576x1024.jpeg 576w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/developer-option-view-169x300.jpeg 169w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/developer-option-view.jpeg 720w\" sizes=\"auto, (max-width: 266px) 100vw, 266px\" \/><figcaption><strong>Step 4<\/strong> : USB debugging off<\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/after-clicking-on-usb-debugging-576x1024.jpeg\" alt=\"\" class=\"wp-image-15759\" width=\"262\" height=\"465\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/after-clicking-on-usb-debugging-576x1024.jpeg 576w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/after-clicking-on-usb-debugging-169x300.jpeg 169w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/after-clicking-on-usb-debugging.jpeg 720w\" sizes=\"auto, (max-width: 262px) 100vw, 262px\" \/><figcaption><strong>Step 5:<\/strong> USB debugging on<\/figcaption><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Set up the Android emulator<\/h3>\n\n\n\n<p>Test you flutter app in Android Emulator, follow below steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Open Android Studio<\/li><li>run any Android Studio Project<\/li><li>then click on <strong>Tools<\/strong> Menu <strong><strong>\u2192<\/strong><\/strong>  <strong>AVD Manager<\/strong> <strong>\u2192<\/strong> <strong>Android Virtual Device<\/strong> <strong>Manger<\/strong> popup will appear<\/li><li>Then click on Create Virtual Device&#8230;<\/li><li>then a Virtual Device Configuration  popup will appear <strong>\u2192<\/strong> Select Phone Pixel 2 and click on Next <strong><strong>\u2192<\/strong><\/strong> Select Android version Oreo (Android 8.1) <strong>\u2192<\/strong> Click on Next Button <strong>\u2192<\/strong> Type Your AVD Name <strong>\u2192<\/strong> Click On Finish Button<\/li><li>After that it will take some time to download the files to setup Android Virtual Device<\/li><li>In Android Virtual Device Manager, click&nbsp;<strong>Run<\/strong>&nbsp;in the toolbar. The emulator starts up and displays the default canvas for your selected OS version and device.<\/li><\/ol>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"742\" height=\"486\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/android-studio-front-view.jpg\" alt=\"\" class=\"wp-image-15762\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/android-studio-front-view.jpg 742w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/android-studio-front-view-300x196.jpg 300w\" sizes=\"auto, (max-width: 742px) 100vw, 742px\" \/><figcaption><strong>Android Studio Front view<\/strong><\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"673\" height=\"387\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/avd-manager-under-toolsmenu.jpg\" alt=\"\" class=\"wp-image-15763\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/avd-manager-under-toolsmenu.jpg 673w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/avd-manager-under-toolsmenu-300x173.jpg 300w\" sizes=\"auto, (max-width: 673px) 100vw, 673px\" \/><figcaption><strong>AVD Manager under Tools Menu<\/strong><\/figcaption><\/figure><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"828\" height=\"538\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/android-virtual-device-manager-view.jpg\" alt=\"\" class=\"wp-image-15765\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/android-virtual-device-manager-view.jpg 828w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/android-virtual-device-manager-view-300x195.jpg 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/android-virtual-device-manager-view-768x499.jpg 768w\" sizes=\"auto, (max-width: 828px) 100vw, 828px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Set up an Editor<\/h3>\n\n\n\n<p>Here i am going to setup a editor Visual Studio Code for code practices. you can also install other editors Like Sublime, <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/www.jetbrains.com\/idea\/download\/#section=windows\" target=\"_blank\" rel=\"noreferrer noopener\">IntelliJ IDEA<\/a> and <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/www.gnu.org\/software\/emacs\/download.html\" target=\"_blank\" rel=\"noreferrer noopener\">Emacs<\/a> etc.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Download and Install <a href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\" rel=\"noopener\">VS Code<\/a><\/li><li>then install plugin flutter and dart to work with Flutter projects.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"365\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/VS-code-website-for-software-download-1024x365.jpg\" alt=\"\" class=\"wp-image-15767\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/VS-code-website-for-software-download-1024x365.jpg 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/VS-code-website-for-software-download-300x107.jpg 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/VS-code-website-for-software-download-768x274.jpg 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/VS-code-website-for-software-download.jpg 1328w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>VS Code for Windows<\/figcaption><\/figure>\n\n\n\n<p>In the above steps you will learn how to setup flutter, Android Studio and Visual Studio Code. After that you can run a flutter project easily. i will show you the hello world app in Flutter to my next blog. Thanks for reading my blog and if you want some help on above blog then comment us. we will help you to solve those issues.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">References : <\/h4>\n\n\n\n<ol class=\"wp-block-list\"><li><a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/www.youtube.com\/channel\/UCwXdFgeE9KYzlDdR7TG9cMw\" target=\"_blank\" rel=\"noreferrer noopener\">Flutter Youtube Channel<\/a><\/li><li><a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/www.youtube.com\/watch?v=qWL1lGchpRA&amp;list=PLR2qQy0Zxs_UdqAcaipPR3CG1Ly57UlhV\" target=\"_blank\" rel=\"noreferrer noopener\">Google&#8217;s Flutter tutorial<\/a><\/li><li><a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/www.youtube.com\/watch?v=UgmKKtmgdKY\" target=\"_blank\" rel=\"noreferrer noopener\">VS Code Setup and First app <\/a><\/li><li><a href=\"https:\/\/www.youtube.com\/watch?v=pTJJsmejUOQ\" target=\"_blank\" aria-label=\"undefined (opens in a new tab)\" rel=\"noreferrer noopener\">Flutter Beginner Course<\/a><\/li><\/ol>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Flutter is Google&#8217;s portable UI (user interface) framework for producing modern, native and reactive mobile(Android, iOS) application, Web and desktop from a single codebase. Flutter is an open-source project hosted&#8230; <\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[530],"tags":[6204,348,6203,4696],"class_list":["post-15744","post","type-post","status-publish","format-standard","hentry","category-android","tag-android-studio","tag-developer","tag-flutter","tag-google"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/15744","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=15744"}],"version-history":[{"count":6,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/15744\/revisions"}],"predecessor-version":[{"id":16321,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/15744\/revisions\/16321"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=15744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=15744"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=15744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}