<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Innovation Incubator</title>
    <description>The latest articles on DEV Community by Innovation Incubator (@innovationincu).</description>
    <link>https://dev.to/innovationincu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F1720%2F3aefb24f-5ecb-44c3-b6a1-83958b7aab15.png</url>
      <title>DEV Community: Innovation Incubator</title>
      <link>https://dev.to/innovationincu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/innovationincu"/>
    <language>en</language>
    <item>
      <title>FLUTTER: 6 excellent ways to implement Image widget</title>
      <dc:creator>tkpranav</dc:creator>
      <pubDate>Sat, 20 Jun 2020 14:09:10 +0000</pubDate>
      <link>https://dev.to/innovationincu/flutter-6-excellent-ways-to-implement-image-widget-25ga</link>
      <guid>https://dev.to/innovationincu/flutter-6-excellent-ways-to-implement-image-widget-25ga</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uZwkvBp2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1000/0%2As7of7kWnf9fDg4XM.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uZwkvBp2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1000/0%2As7of7kWnf9fDg4XM.jpeg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Flutter Image Widget
&lt;/h3&gt;

&lt;p&gt;You can use the Flutter Image widget in 6 ways such as &lt;strong&gt;FadeInImage&lt;/strong&gt; , &lt;strong&gt;Ink Image&lt;/strong&gt; , &lt;strong&gt;Asset Image&lt;/strong&gt; , &lt;strong&gt;Network Image&lt;/strong&gt; , &lt;strong&gt;Memory Image&lt;/strong&gt; , and &lt;strong&gt;File Image&lt;/strong&gt;. We will see how we can use the Flutter Image widget in a much better way. Image widget is an essential widget in Flutter because without image you cannot develop a beautiful app. Images express the content better than text.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Flutter Network Image
&lt;/h3&gt;

&lt;p&gt;Network Image widget uses the internet to show the image, you can use any URL of an image to display the image. It is better to use Network Image over Asset Image because it reduces the app size, you don’t have to keep any images in the app.&lt;/p&gt;

&lt;p&gt;Now you have to create &lt;strong&gt;main.dart&lt;/strong&gt; file which will be used to demonstrate the all the widget example.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;main.dart&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import 'package:flutter/material.dart';
import 'package:flutter\_image\_widget/image\_widget/assets\_image\_widget.dart';
import 'package:flutter\_image\_widget/image\_widget/fade\_image\_widget.dart';
import 'package:flutter\_image\_widget/image\_widget/file\_image\_widget.dart';
import 'package:flutter\_image\_widget/image\_widget/ink\_image\_widget.dart';
import 'package:flutter\_image\_widget/image\_widget/memory\_image\_widget.dart';
import 'package:flutter\_image\_widget/image\_widget/network\_image\_widget.dart';

void main() {
  runApp(
    MaterialApp(
      theme: ThemeData(primarySwatch: Colors.green),
      debugShowCheckedModeBanner: false,
      home: NetworkImageWidget()
    ),
  );
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;As you can see the main.dart file code, you can replace &lt;strong&gt;NetworkImageWidget()&lt;/strong&gt; from home with our upcoming image widgets and you are ready to run the app. Now create file network_image_widget.dart file, this will be used for network image widget example.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;network_image_widget.dart&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import 'package:flutter/material.dart';

class NetworkImageWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Network Image'),
      ),
      body: Container(
        color: Colors.white,
        padding: EdgeInsets.all(16),
        child: Image.network(
          '[https://toppng.com/uploads/preview/batman-png-11553978541s9xp0sddf1.png](https://toppng.com/uploads/preview/batman-png-11553978541s9xp0sddf1.png)',
          frameBuilder: (BuildContext context, Widget child, int frame,
                  bool wasSynchronouslyLoaded) =&amp;gt;
              wasSynchronouslyLoaded
                  ? child
                  : AnimatedOpacity(
                      child: child,
                      opacity: frame == null ? 0 : 1,
                      duration: const Duration(seconds: 2),
                      curve: Curves.easeOut,
                    ),
          loadingBuilder: (context, child, progress) =&amp;gt; progress == null
              ? child
              : LinearProgressIndicator(
                  valueColor: AlwaysStoppedAnimation&amp;lt;Color&amp;gt;(Colors.red),
                ),
          errorBuilder:
              (BuildContext context, Object exception, StackTrace stackTrace) =&amp;gt;
                  Text('Failed to load image'),

        ),
      ),
    );
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;To display image from URL you have to use &lt;strong&gt;Image.network&lt;/strong&gt; widget, as you can see the above code I have passed the image URL to display the image, apart from URL I have used frameBuilder, loadingBuilder, and errorBuilder. This three property is common to all image widget so I will cover these properties only for network image widget, you do the same with other image widgets.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;frameBuilder&lt;/strong&gt;   &lt;strong&gt;:-&lt;/strong&gt; It will display the image with given animation, I have used an &lt;strong&gt;AnimatedOpacity&lt;/strong&gt; widget this will load the image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;loadingBuilder :-&lt;/strong&gt; This will display another widget until it finishes to load, I have returned the &lt;strong&gt;LinearProgressIndicator&lt;/strong&gt; widget.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;errorBuilder :-&lt;/strong&gt; If you have used the wrong URL or device is not connected to the internet then you can use this property to display another widget.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Note :- Do not use loadingBuilder and frameBuilder at a same time, loadingBuilder will override the frameBuilder.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Flutter Asset Image
&lt;/h3&gt;

&lt;p&gt;Assets Image widget uses an image from the root directory of your project, before using any image you have to add image path to pubspec.yaml file. I have created an “images” folder inside the project root directory and added a cover.png file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;pubspec.yaml&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flutter:

  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
    - images/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Add images folder inside assets tag to access all the images from directory.&lt;/p&gt;

&lt;p&gt;Now create asset_image_widget.dart file to display the images from root directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;assets_image_widget.dart&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import 'package:flutter/material.dart';

class AssetsImageWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Asset Image'),
      ),
      body: Container(
        color: Colors.white,
        child: Image.asset(
          'images/cover.png',

        ),
      ),
    );
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now replace NetworkImageWidget from main.dart file with AssetsImageWidget. You can use frameBuilder, loadingBuilder, and errorBuilder with asset image also. Image used &lt;strong&gt;Image.asset()&lt;/strong&gt; widget to display the image.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Flutter Memory Image
&lt;/h3&gt;

&lt;p&gt;Memory Image widget is best if you want to display base64Image. As said you can use frameBuilder, loadingBuilder, and errorBuilder with &lt;strong&gt;Image.memory()&lt;/strong&gt; widget. Now create memory_image_widget.dart file and replace it in main.dart file from your previous widget and create image_string.dart file to store the base64 format of the image.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;image_string.dart&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const base64Image = 'base64Image string';
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;memory_image_widget.dart&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter\_image\_widget/image\_string.dart';

class MemoryImageWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Memory Image'),
      ),
      body: Container(
        color: Colors.white,
        child: Image.memory(
          base64Decode(base64Image),
        ),
      ),
    );
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I have used &lt;strong&gt;Image.memory()&lt;/strong&gt; widget to display the base64Image and &lt;strong&gt;base64Decode()&lt;/strong&gt; function is used to decode the string.&lt;/p&gt;

&lt;p&gt;Flutter also supports to Ink Image which will gives the nice and beautiful touch or click effect i.e. ripple effect. You can have ripple effect like Android in Flutter for image widget.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Flutter Ripple Effect on Image
&lt;/h3&gt;

&lt;p&gt;create ink_image_widget.dart file, to achieve the ripple effect on the image, make sure that you have replaced the previous widget with InkImageWidget().&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ink_image_widget.dart&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import 'package:flutter/material.dart';

class InkImageWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Ink Image'),
      ),
      body: Container(
        color: Colors.white,
        child: Material(
          color: Colors.transparent,
          child: Ink.image(
            image: AssetImage('images/cover.png'),
            fit: BoxFit.contain,
            height: 100,
            child: InkWell(
              splashColor: Colors.green.withOpacity(.2),
              onTap: () {},
            ),
          ),
        ),
      ),
    );
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I have used the &lt;strong&gt;Ink.image()&lt;/strong&gt; widget along with the &lt;strong&gt;Material&lt;/strong&gt; widget to achieve the ripple effect. Note height parameter is important otherwise ripple effect will cover the whole screen.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Flutter FadeInImage Widget
&lt;/h3&gt;

&lt;p&gt;FadeInImage widget is used to display the asset image and memory image with a fade animation. This widget loads the image by fading the placeholder image. Create a file fade_image_widget.dart and replace the previous widget in main.dart with &lt;strong&gt;FadeImageWidget()&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;fade_image_widget.dart&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import 'package:flutter/material.dart';

class FadeImageWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Fade In Image'),
      ),
      body: Container(
        color: Colors.white,
        child: FadeInImage.assetNetwork(
          placeholder: 'images/cover.png',
          image:
              '[https://toppng.com/uploads/preview/batman-png-11553978541s9xp0sddf1.png](https://toppng.com/uploads/preview/batman-png-11553978541s9xp0sddf1.png)',
        ),
      ),
    );
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I have used &lt;strong&gt;FadeInImage.assetImage()&lt;/strong&gt; widget you can also use &lt;strong&gt;FadeInImage.memoryImage()&lt;/strong&gt; instead of image path you have use base64Image string in memoryImage widget. Placeholder parameter is used to show the static image util it finishes to load the asset image.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Flutter File Image Widget
&lt;/h3&gt;

&lt;p&gt;Flutter has &lt;strong&gt;Image.file()&lt;/strong&gt; widget to display the image from the device, you can use the &lt;a href="https://pub.dev/packages/path_provider"&gt;&lt;strong&gt;path_provider&lt;/strong&gt;&lt;/a&gt; package to get the image path from local storage. Now create file_image_widget.dart file and add it to the main.dart.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;file_image_widget.dart&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import 'dart:io';
import 'package:flutter/material.dart';

class FileImageWidget extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('File Image'),
      ),
      body: Container(
        color: Colors.white,
        child: Image.file(
          File(
            'Use Path provider get image from local storage',
          ),
        ),
      ),
    );
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I have used &lt;strong&gt;Image.file()&lt;/strong&gt; widget along with File class to display the image from local storage.&lt;/p&gt;




</description>
      <category>flutter</category>
      <category>flutterwidget</category>
      <category>flutterapp</category>
      <category>flutterimagewidgets</category>
    </item>
    <item>
      <title>FLUTTER : DART CHEAT SHEET- Write Smart Code</title>
      <dc:creator>tkpranav</dc:creator>
      <pubDate>Sat, 20 Jun 2020 06:11:43 +0000</pubDate>
      <link>https://dev.to/innovationincu/flutter-dart-cheat-sheet-write-smart-code-c7j</link>
      <guid>https://dev.to/innovationincu/flutter-dart-cheat-sheet-write-smart-code-c7j</guid>
      <description>&lt;h3&gt;
  
  
  FLUTTER : DART CHEAT SHEET- Write Smart Code
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2xe4ntz1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2AF8P3wko5tlYVuujg.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2xe4ntz1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/0%2AF8P3wko5tlYVuujg.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While writing a long code for some functionality, you know that there will be an easier way to do it.&lt;/p&gt;

&lt;p&gt;You might find a few of that in this post or maybe a hint.&lt;/p&gt;

&lt;p&gt;This is just the icing, there are many of these functionality pre-built for you.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Cascades
&lt;/h4&gt;

&lt;p&gt;Normal Way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lqhwJ0Kr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/442/1%2Ark1sXp4Tgwer2UqPFce37g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lqhwJ0Kr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/442/1%2Ark1sXp4Tgwer2UqPFce37g.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Smart Way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WgrnCfqv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/407/1%2A-XkEfqw7ZCPqF3tnHk6_yw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WgrnCfqv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/407/1%2A-XkEfqw7ZCPqF3tnHk6_yw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Null -aware operator
&lt;/h4&gt;

&lt;p&gt;Normal Way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1zvcQWSW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/435/1%2A7DkazdM3uYB00zyVeZxKHg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1zvcQWSW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/435/1%2A7DkazdM3uYB00zyVeZxKHg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Smart Way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---hBZrrsY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/444/1%2ACKiWHGl9h4WLdGXSzIOUBQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---hBZrrsY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/444/1%2ACKiWHGl9h4WLdGXSzIOUBQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Ternary Operator
&lt;/h4&gt;

&lt;p&gt;Normal Way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gzjLcpoq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/481/1%2AtWb3rT8220KcNPdwE_iMwg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gzjLcpoq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/481/1%2AtWb3rT8220KcNPdwE_iMwg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Smart Way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--i20R4gya--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/442/1%2AYTDK3S-kGKccrPy8Rbt4OA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i20R4gya--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/442/1%2AYTDK3S-kGKccrPy8Rbt4OA.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Null -aware operator
&lt;/h4&gt;

&lt;p&gt;Normal Way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f2sMmDDi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/370/1%2AWOGd8aE95HVJgGKQrenxjw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f2sMmDDi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/370/1%2AWOGd8aE95HVJgGKQrenxjw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Smart Way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XJJKJd_a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/388/1%2A-ywjNXqXzC3K4vhLoKxc_w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XJJKJd_a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/388/1%2A-ywjNXqXzC3K4vhLoKxc_w.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Assert Statement
&lt;/h4&gt;

&lt;p&gt;Normal Way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TLhR_IZD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/469/1%2AUTP5dVnkwz0gyhaL_kqvdg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TLhR_IZD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/469/1%2AUTP5dVnkwz0gyhaL_kqvdg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Smart Way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ic7uJet8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/427/1%2ApO9wmybp4nkbah4jxiBCwg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ic7uJet8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/427/1%2ApO9wmybp4nkbah4jxiBCwg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  6. Index in List
&lt;/h4&gt;

&lt;p&gt;Normal Way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PvnxnAHR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/509/1%2ApZK2v7j8mZTmn-BCP9BPDQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PvnxnAHR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/509/1%2ApZK2v7j8mZTmn-BCP9BPDQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Smart Way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CncebqD---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/517/1%2ABJgYszpXEpcJkrahGbRLaw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CncebqD---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/517/1%2ABJgYszpXEpcJkrahGbRLaw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  7. Getters
&lt;/h4&gt;

&lt;p&gt;Normal Way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t8YPOnsm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/397/1%2A3_s3olzgCrAjsGk_hcqBVA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t8YPOnsm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/397/1%2A3_s3olzgCrAjsGk_hcqBVA.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Smart Way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ocppnUsq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/387/1%2AZ9fW8SsGx8F6qD5FPKGemQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ocppnUsq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/387/1%2AZ9fW8SsGx8F6qD5FPKGemQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  8. Exceptions
&lt;/h4&gt;

&lt;p&gt;Smart Way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RZZw00Zs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/440/1%2A9xt8ovvbodaaHJN0lHFPzA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RZZw00Zs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/440/1%2A9xt8ovvbodaaHJN0lHFPzA.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;




</description>
      <category>dartcheatsheet</category>
      <category>flutter</category>
      <category>flutterappdevelopmen</category>
      <category>flutterwidget</category>
    </item>
    <item>
      <title>Flutter : How to draw with custom painter</title>
      <dc:creator>tkpranav</dc:creator>
      <pubDate>Tue, 09 Jun 2020 11:29:27 +0000</pubDate>
      <link>https://dev.to/innovationincu/flutter-how-to-draw-with-custom-painter-2ggi</link>
      <guid>https://dev.to/innovationincu/flutter-how-to-draw-with-custom-painter-2ggi</guid>
      <description>&lt;h3&gt;
  
  
  Flutter : How to draw with custom painter
&lt;/h3&gt;

&lt;h3&gt;
  
  
  What is custom painter ?
&lt;/h3&gt;

&lt;p&gt;Custom painter is used to draw standard as well as custom shapes on the screen and is very powerful, it let’s you draw anything that you can think about.&lt;br&gt;&lt;br&gt;
All you need is a little imagination and a little maths.&lt;/p&gt;

&lt;p&gt;Here is a simple basic quick run so you don’t need to worry about technicalities and get straight to painting.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z42MK693--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/380/1%2AwYPyLrt-6e1WGul4S0Ip2A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z42MK693--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/380/1%2AwYPyLrt-6e1WGul4S0Ip2A.png" alt=""&gt;&lt;/a&gt;Created with custom painter.&lt;/p&gt;

&lt;h4&gt;
  
  
  1.Custom Paint.
&lt;/h4&gt;

&lt;p&gt;In widget tree, we only have to add the &lt;strong&gt;CustomPaint&lt;/strong&gt; widget and give it a painter.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ljtb0VHM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/600/1%2AIDXY6cRoGpMTwGMAicfLTw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ljtb0VHM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/600/1%2AIDXY6cRoGpMTwGMAicfLTw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2.Custom Painter.
&lt;/h4&gt;

&lt;p&gt;Create &lt;strong&gt;MyCustomPainter&lt;/strong&gt; class and add two required methods.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aKPAJKU5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/585/1%2ALBSRsJlZmQlRSSKQxucZmA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aKPAJKU5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/585/1%2ALBSRsJlZmQlRSSKQxucZmA.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Paint&lt;/strong&gt; method defines what we want to draw or paint on the canvas.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ShouldRepaint&lt;/strong&gt; method defines when we want to repaint the canvas.&lt;/p&gt;

&lt;p&gt;Shown below is a simple breakdown image of the canvas:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QxZwhV4C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/554/1%2AC6hen6Bvd2P63bYiq_o2jw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QxZwhV4C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/554/1%2AC6hen6Bvd2P63bYiq_o2jw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Draw Circle
&lt;/h4&gt;

&lt;p&gt;To draw a circle specify the center, radius and the color of the circle.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wNAPRU_5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/596/1%2AjSyTocmENaJp41bL3mvwhA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wNAPRU_5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/596/1%2AjSyTocmENaJp41bL3mvwhA.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2OYNt_03--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/270/1%2AdOQQEVKt0li3kLTWwWfcgQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2OYNt_03--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/270/1%2AdOQQEVKt0li3kLTWwWfcgQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Rectangle
&lt;/h4&gt;

&lt;p&gt;To draw a rectangle specify center height and width.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X5GtYp73--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/592/1%2AkzEdvGYeaGcWeB_u3-POwg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X5GtYp73--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/592/1%2AkzEdvGYeaGcWeB_u3-POwg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YWqCWT1X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/262/1%2AOOkirBcrmnuWPdt-4n3Kfw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YWqCWT1X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/262/1%2AOOkirBcrmnuWPdt-4n3Kfw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;




</description>
      <category>flutterwidget</category>
      <category>flutter</category>
      <category>flutterpaint</category>
      <category>flutterappdevelopmen</category>
    </item>
    <item>
      <title>How to automatically update IP addresses without using Elastic IPs on Amazon Route:53</title>
      <dc:creator>NAEEM HADIQ</dc:creator>
      <pubDate>Tue, 09 Jun 2020 06:21:33 +0000</pubDate>
      <link>https://dev.to/innovationincu/how-to-automatically-update-ip-addresses-without-using-elastic-ips-on-amazon-route-53-55eo</link>
      <guid>https://dev.to/innovationincu/how-to-automatically-update-ip-addresses-without-using-elastic-ips-on-amazon-route-53-55eo</guid>
      <description>&lt;p&gt;Here’s a handy way to automatically update an A-Record in Amazon Route 53 whenever an EC2 instance changes IP address.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario:&lt;/strong&gt; When you have a domain name in Amazon Route 53 pointing to an Amazon EC2 instance. However, if the instance is stopped and started, its public IP address changes. This breaks the A-Record since it is pointing to the wrong IP address.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You could simply use an Elastic IP address&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes, using an Elastic IP address on the instance will prevent the A-Record from breaking. However, AWS gives a default limit of 5 Elastic IP addresses per region. You can request a limit increase, but in cases, you need a lot of them its still hard and still a pain.&lt;/p&gt;

&lt;p&gt;As an example, let's assume a service providing a separate Amazon EC2 instance for each customer, to ensure secure separation of data. Each customer is given a domain name to access their server (x.medium.com). The required number of Elastic IP addresses could be &lt;em&gt;huge&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;There is a simple way to do this without elastic ip though there is a fairly simple way to achieve the objective without needing &lt;em&gt;any&lt;/em&gt; Elastic IP addresses.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq8tlpeo0aa0uz3e2u149.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq8tlpeo0aa0uz3e2u149.png" width="800" height="328"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The architecture is quite simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When an EC2 instance starts, it should get its new public IP address and update its own record in Route 53&lt;/li&gt;
&lt;li&gt;The DNS name to update is stored in a &lt;strong&gt;Tag&lt;/strong&gt; on the EC2 instance&lt;/li&gt;
&lt;li&gt;The script should execute every time the EC2 instance starts (that is, &lt;em&gt;every&lt;/em&gt; time it starts, not just the first boot)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Implementation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First, there should be a &lt;strong&gt;Record Set in Amazon Route 53&lt;/strong&gt; that defines the existing domain name.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fywi1qfrwkdijufekp266.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fywi1qfrwkdijufekp266.png" width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is currently pointing to the public IP address of an EC2 instance.&lt;/p&gt;

&lt;p&gt;Next, add some tags to the EC2 instance that will be used by the script:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DNS Name:&lt;/strong&gt; The DNS Name to associate with the instance&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hosted Zone ID:&lt;/strong&gt; Uniquely identifies the Zone record in Route 53 that needs to be updated (get it from your Route 53 Hosted Zone record)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flg5bzjphm6yxw1wty7bi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flg5bzjphm6yxw1wty7bi.png" width="800" height="228"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Whenever the EC2 instance starts, it will run a script that will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Grab the information from the above tags&lt;/li&gt;
&lt;li&gt;Retrieve the instance’s current public IP address&lt;/li&gt;
&lt;li&gt;Update the Route 53 record set with the new IP address
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash
# Extract information about the Instance
INSTANCE\_ID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id/)
AZ=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone/)
MY\_IP=$(curl -s http://169.254.169.254/latest/meta-data/public-ipv4/)

# Extract tags associated with instance
ZONE\_TAG=$(aws ec2 describe-tags --region ${AZ::-1} --filters "Name=resource-id,Values=${INSTANCE\_ID}" --query 'Tags[?Key==`AUTO_DNS_ZONE`].Value' --output text)
NAME\_TAG=$(aws ec2 describe-tags --region ${AZ::-1} --filters "Name=resource-id,Values=${INSTANCE\_ID}" --query 'Tags[?Key==`AUTO_DNS_NAME`].Value' --output text)

# Update Route 53 Record Set based on the Name tag to the current Public IP address of the Instance
aws route53 change-resource-record-sets --hosted-zone-id $ZONE\_TAG --change-batch '{"Changes":[{"Action":"UPSERT","ResourceRecordSet":{"Name":"'$NAME\_TAG'","Type":"A","TTL":300,"ResourceRecords":[{"Value":"'$MY\_IP'"}]}}]}'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To execute the script automatically each time the instance starts (as opposed to User Data scripts that only run on the &lt;em&gt;first&lt;/em&gt; boot), put the above script in this directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/var/lib/cloud/scripts/per-boot/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, the EC2 instance will need an IAM Role assigned that has permission to run the above commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "Version": "2020-06-9",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "ec2:DescribeTags",
            "Resource": "\*"
        },
        {
            "Effect": "Allow",
            "Action": "route53:ChangeResourceRecordSets",
            "Resource": "arn:aws:route53:::hostedzone/HOSTED-ZONE-ID"
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;How to test&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To test the script, simply &lt;strong&gt;Stop&lt;/strong&gt; the instance then &lt;strong&gt;Start&lt;/strong&gt; it again.&lt;/p&gt;

&lt;p&gt;This will result in a new public IP address being assigned to the instance. The script will call Amazon Route 53 to update the record set. This might take a minute to update.&lt;/p&gt;

&lt;p&gt;Then, return to Route 53 and look at the IP address assigned to the A-Record. It should be updated with the new IP address.&lt;/p&gt;




</description>
      <category>aws</category>
      <category>ec2</category>
      <category>route53</category>
      <category>elasticip</category>
    </item>
    <item>
      <title>Live Location (Flutter + Google Map)</title>
      <dc:creator>NIBRAS NAZAR</dc:creator>
      <pubDate>Fri, 29 May 2020 09:55:16 +0000</pubDate>
      <link>https://dev.to/innovationincu/live-location-flutter-google-map-55d4</link>
      <guid>https://dev.to/innovationincu/live-location-flutter-google-map-55d4</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rB97o8b7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AvPV4p633KBi90VWAgiqCDA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rB97o8b7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AvPV4p633KBi90VWAgiqCDA.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Integrating Google Map
&lt;/h4&gt;

&lt;p&gt;To get started we need to first add Google Maps in our flutter application. This is done with the help of a Flutter plugin google_maps_flutter for integrating Google Maps in iOS and Android applications.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add google_maps_flutter as a dependency in your pubspec.yaml file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fzam3Ae---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/418/1%2AKdzbn1xo2OqS-BK09V9Ssw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fzam3Ae---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/418/1%2AKdzbn1xo2OqS-BK09V9Ssw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Get an API key at &lt;a href="https://cloud.google.com/maps-platform/"&gt;https://cloud.google.com/maps-platform/&lt;/a&gt; and enable Google Map SDK. find detailed steps &lt;a href="https://developers.google.com/maps/gmp-get-started"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Specify your API key in the application manifest android/app/src/main/AndroidManifest.xml
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;manifest ...
  &amp;lt;application ...
    &amp;lt;meta-data android:name="com.google.android.geo.API\_KEY"
               android:value="YOUR API KEY"/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;import the package and you can now add a GoogleMap widget to your widget tree.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;**import**'package:google\_maps\_flutter/google\_maps\_flutter.dart';

**void** main() =&amp;gt; runApp(MyApp());

**class**  **MyApp**  **extends**  **StatelessWidget** {
**@override**
  Widget build(BuildContext context) {
**return** MaterialApp(
      title: 'Demo',
      home: MapSample(),
    );
  }
}

class MapSample extends StatefulWidget {
@override
\_MapSampleState createState() =&amp;gt; \_MapSampleState();
}

class \_MapSampleState extends State&amp;lt;MapSample&amp;gt; {

GoogleMapController mapController;

LatLng \_initialPosition = LatLng(37.42796133588664, -122.885740655967);

void \_onMapCreated(GoogleMapController \_cntrl) async {
mapController = await \_cntrl;
}

return Scaffold(
  appBar: AppBar(
  backgroundColor: Color(0xff2758a1),
  title: Text('Demo'),
  ),
  body: Stack(
    children: &amp;lt;Widget&amp;gt;[
    GoogleMap(
      initialCameraPosition: CameraPosition(target: \_initialPosition, zoom: 10),
      mapType: MapType.normal,
      onMapCreated: \_onMapCreated,
      myLocationEnabled: true,
      myLocationButtonEnabled: true,
      zoomControlsEnabled: false,
      )
     ],
   ),
 );
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;
  
  
  Implementing live location
&lt;/h4&gt;

&lt;p&gt;To implement live location we need to add Flutter Location Plugin . It's a Flutter plugin to easily handle a realtime location in iOS and Android.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add Flutter Location Pluginas a dependency in your file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cjJYaunj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/378/1%2AEkOtd2iYOiOOilxunBQRDg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cjJYaunj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/378/1%2AEkOtd2iYOiOOilxunBQRDg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;import the package with
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;**import**'package:location/location.dart';
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;now we will make use of a listener to get continuous callbacks whenever the device position is changing.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Location location = **new** Location();

location.onLocationChanged.listen((LocationData currentLocation) {
_// Use current location_
});
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;now let’s add this listener on our _onMapCreated Function with the functionality to animate the camera to each change in the device position.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void \_onMapCreated(GoogleMapController \_cntrl) async {

mapController = await \_cntrl;

locationSubscription = \_location.onLocationChanged.listen((l) {
  mapController.animateCamera(
    CameraUpdate.newCameraPosition(
      CameraPosition(target: LatLng(l.latitude, l.longitude),zoom: 18)),

);

}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Final code
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;**void** mai() =&amp;gt; runApp(MyApp());

**class**  **MyApp**  **extends**  **StatelessWidget** {
**@override**
  Widget build(BuildContext context) {
**return** MaterialApp(
      title: 'Demo',
      home: MapSample(),
    );
  }
}

class MapSample extends StatefulWidget {
@override
\_MapSampleState createState() =&amp;gt; \_MapSampleState();
}

class \_MapSampleState extends State&amp;lt;MapSample&amp;gt; {

GoogleMapController mapController;
Location location = **new** Location();

LatLng \_initialPosition = LatLng(37.42796133588664, -122.885740655967);

void \_onMapCreated(GoogleMapController \_cntrl) async {

mapController = await \_cntrl;

locationSubscription = \_location.onLocationChanged.listen((l) {
  mapController.animateCamera(
    CameraUpdate.newCameraPosition(
      CameraPosition(target: LatLng(l.latitude, l.longitude),zoom: 18)),

);

}

return Scaffold(
  appBar: AppBar(
  backgroundColor: Color(0xff2758a1),
  title: Text('Demo'),
  ),
  body: Stack(
    children: &amp;lt;Widget&amp;gt;[
    GoogleMap(
      initialCameraPosition: CameraPosition(target: \_initialPosition, zoom: 10),
      mapType: MapType.normal,
      onMapCreated: \_onMapCreated,
      myLocationEnabled: true,
      myLocationButtonEnabled: true,
      zoomControlsEnabled: false,
      )
     ],
   ),
 );
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;
  
  
  Reference
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Google Map plugin:&lt;/strong&gt; &lt;a href="https://pub.dev/packages/google_maps_flutter"&gt;https://pub.dev/packages/google_maps_flutter&lt;/a&gt; &lt;strong&gt;location plugin:&lt;/strong&gt; &lt;a href="https://pub.dev/packages/location"&gt;https://pub.dev/packages/location&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enjoy Coding ……………!&lt;/strong&gt;&lt;/p&gt;




</description>
      <category>livelocation</category>
      <category>googlemaps</category>
      <category>flutter</category>
    </item>
    <item>
      <title>How To Make API Request In Flutter.?</title>
      <dc:creator>tkpranav</dc:creator>
      <pubDate>Tue, 26 May 2020 14:03:00 +0000</pubDate>
      <link>https://dev.to/innovationincu/how-to-make-api-request-in-flutter-2i99</link>
      <guid>https://dev.to/innovationincu/how-to-make-api-request-in-flutter-2i99</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fYtqCxso--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AEnmjF5Rz8RnlItQX2aJpTw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fYtqCxso--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AEnmjF5Rz8RnlItQX2aJpTw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What all we need ….??
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;http&lt;/strong&gt; package to make the request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;dart:convert&lt;/strong&gt; to process the response from server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So now let’s make an App that will make API request to get the List of ToDo’s.&lt;/p&gt;

&lt;p&gt;And then we will display the first ToDo.&lt;/p&gt;

&lt;p&gt;Let’s get into the steps:&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Creating UI.
&lt;/h4&gt;

&lt;p&gt;Create a ListTile , that will show our ToDo and a button which will make API request.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zuWzYbuj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/294/1%2AkxaQIafD7Sbj_iZG2HD1eg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zuWzYbuj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/294/1%2AkxaQIafD7Sbj_iZG2HD1eg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mFGnWS6h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/597/1%2ABGJ_N71ZDOkcwp8y4A48Cw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mFGnWS6h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/597/1%2ABGJ_N71ZDOkcwp8y4A48Cw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Making Request.
&lt;/h4&gt;

&lt;p&gt;Create a method ,which will make API request.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DD-ufCx4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/206/1%2AqaZ-gr9JCM9Ik5z8fvLZvQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DD-ufCx4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/206/1%2AqaZ-gr9JCM9Ik5z8fvLZvQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SgQyks2O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/593/1%2ACvF9nfQXKUxK8w2U4_VkbA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SgQyks2O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/593/1%2ACvF9nfQXKUxK8w2U4_VkbA.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Processing Data.
&lt;/h4&gt;

&lt;p&gt;Now, we have to process the response, so we can use it easily.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HlbO_PJk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/191/1%2AytEJcC0LEDppZIqjsK3-NQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HlbO_PJk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/191/1%2AytEJcC0LEDppZIqjsK3-NQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sxz9tdzf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/588/1%2AzlGK2w5jA4PcJVQ5hXJQBw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sxz9tdzf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/588/1%2AzlGK2w5jA4PcJVQ5hXJQBw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4.Updating UI
&lt;/h4&gt;

&lt;p&gt;Update the UI with received data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4o-CwyjW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/191/1%2AzhPcN9fWFNMGeO3Mk1XCYw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4o-CwyjW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/191/1%2AzhPcN9fWFNMGeO3Mk1XCYw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4NcP8ixj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/589/1%2A0t63Em41rJkQPNhTCeGqhQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4NcP8ixj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/589/1%2A0t63Em41rJkQPNhTCeGqhQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Functionality
&lt;/h4&gt;

&lt;p&gt;At last, add functionality to the Raised Button&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qMcZvhok--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/297/1%2AsmSrWJD1PtIQZJ3r4Hi8Yg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qMcZvhok--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/297/1%2AsmSrWJD1PtIQZJ3r4Hi8Yg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BlqlO3t1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/595/1%2Ao-30NSjPOuDm8IV0iQHtyw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BlqlO3t1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/595/1%2Ao-30NSjPOuDm8IV0iQHtyw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The URL i have used above provides dummy API’s for trial&lt;/p&gt;

&lt;p&gt;Also don’t forget to mention the http package in the pubspec.yaml file.&lt;/p&gt;




</description>
      <category>flutterdevelopment</category>
      <category>api</category>
      <category>flutterapp</category>
      <category>flutterapi</category>
    </item>
    <item>
      <title>Why you should choose/ consider to move to Flutter?</title>
      <dc:creator>tkpranav</dc:creator>
      <pubDate>Fri, 15 May 2020 12:44:35 +0000</pubDate>
      <link>https://dev.to/innovationincu/why-you-should-choose-consider-to-move-to-flutter-i3h</link>
      <guid>https://dev.to/innovationincu/why-you-should-choose-consider-to-move-to-flutter-i3h</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CRgOS6i6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AzUnZjlh1eETyF9w0AR5OKQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CRgOS6i6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AzUnZjlh1eETyF9w0AR5OKQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At present the rate at which Flutter apps are published on Google Play continues to increase. Flutter is becoming a hot topic and, whether you decide to use it or not, if you want to develop or improve your mobile app, you should be aware of what Flutter is, as well as what pros &amp;amp; risks it carries. Let’s go for a quick roundup.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Flutter?
&lt;/h3&gt;

&lt;p&gt;Flutter is Google’s mobile app SDK, complete with a framework, widgets, and tools, that gives developers an easy way to build and deploy visually attractive, fast mobile apps on both Android and iOS platforms.Flutter enables a smooth and easy cross-platform mobile app development.&lt;/p&gt;

&lt;p&gt;What’s more, Flutter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is free and open source,&lt;/li&gt;
&lt;li&gt;Is based on &lt;a href="https://www.dartlang.org/"&gt;Dart&lt;/a&gt; — a fast, object-oriented programming language which is in itself easy to learn,&lt;/li&gt;
&lt;li&gt;Provide its own widgets, drawn with its own high-performance rendering engine. They are fast, pretty, and customizable,&lt;/li&gt;
&lt;li&gt;Thanks to the rich widgets, Flutter apps look and feel great (you can create your own custom app design, but also use readily available UI elements following specific platforms’ guidelines).&lt;/li&gt;
&lt;li&gt;The architecture of Flutter is based on the very popular reactive programming of today (the same that React has been made from)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9VY-5liQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AP0jvTCw4Oci_4goF10H-9g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9VY-5liQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AP0jvTCw4Oci_4goF10H-9g.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Flutter?
&lt;/h3&gt;

&lt;h3&gt;
  
  
  1. Faster code writing
&lt;/h3&gt;

&lt;p&gt;For developers, Flutter means faster &amp;amp; more dynamic mobile app development. We can make changes in the code and see them straight away in the app! This is the so-called &lt;a href="https://flutter.io/hot-reload/"&gt;&lt;em&gt;Hot reload&lt;/em&gt;&lt;/a&gt;, which usually only takes (milli)seconds and helps teams add features, fix bugs, and experiment faster. It is one of the things about Flutter loved by every development team.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d92WFcPH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/539/1%2AwtnTB5wpjky-Ay8m9jNTAA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d92WFcPH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/539/1%2AwtnTB5wpjky-Ay8m9jNTAA.png" alt=""&gt;&lt;/a&gt;In other words, with Flutter, your designer or tester can work together with a developer on the UI, making changes — for example, “Put it 2 pixels right” or “Make the animation faster” — and see them immediately.&lt;/p&gt;

&lt;p&gt;Most types of code changes can be hot reloaded. But there is a list of changes that require a full restart: &lt;a href="https://flutter.io/hot-reload/#limitations"&gt;Hot reload Limitations&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Whereas, in the case of native app development the project needs to be rebuilt and that takes much more time. You have to wait for every single change — sometimes, even up to several minutes.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. One code for 2 platforms
&lt;/h3&gt;

&lt;p&gt;Developers write just one codebase for your 2 apps — covering both Android and iOS platforms. Flutter doesn’t depend on the platform, because it has its own widgets and designs. This means that you have the same app on two platforms. Yet what’s important is that if you want to differentiate your apps, it’s possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Faster apps
&lt;/h3&gt;

&lt;p&gt;Flutter apps work in a smooth and fast way, without hanging and cutting while scrolling. Also, check out &lt;a href="https://flutter.dev/docs/testing/best-practices"&gt;this amazing page&lt;/a&gt; in the Flutter documentation that talks about best practices for app performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Less testing
&lt;/h3&gt;

&lt;p&gt;If you have the same app for 2 platforms, it means less testing! The Quality Assurance process can be faster. Because of one codebase, the developers write automatic tests only once. What’s more, Quality Assurance specialists have less work to do, because they have only one app to check. Of course, if your apps have some differences, they need to be tested on both platforms.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. The same app UI on older devices
&lt;/h3&gt;

&lt;p&gt;Your new app will look the same, even on old versions of &lt;a href="https://www.thedroidsonroids.com/services/android-mobile-app-development"&gt;Android&lt;/a&gt; and &lt;a href="https://www.thedroidsonroids.com/services/ios-mobile-app-development"&gt;iOS&lt;/a&gt; systems. There are no additional costs for supporting older devices. Flutter runs on Android Jelly Bean or newer, as well as iOS 8 or newer.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Perfect for MVP
&lt;/h3&gt;

&lt;p&gt;Do you need an MVP (Minimum Viable Product) for your app to show it to your investors? Flutter will be perfect, especially if you have little time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5fHvRqRJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AGCX1Zjj2GUAYz5EJglhwhw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5fHvRqRJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AGCX1Zjj2GUAYz5EJglhwhw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to see some apps built with Flutter, check out the &lt;a href="https://play.google.com/store/apps/details?id=io.flutter.demo.gallery"&gt;Flutter Gallery app&lt;/a&gt;, which is a demo of some of Flutter’s features, widgets, and vignettes.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. &lt;strong&gt;Using Dart as a Programming Language&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Dart is an object-oriented programming language which is used for writing mobile application code for Flutter and which contributes to the efficiency and effectiveness of app development flow. It is a comfortable language and uses a lot of CSS parts as well. Dart uses for &lt;strong&gt;&lt;em&gt;generational garbage collection&lt;/em&gt;&lt;/strong&gt; which helps in creating frames for short-lived objects. It also helps to allocate the objects with a single pointer bump to avoid UI jank and shutter.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. The flutter API is very consistant
&lt;/h3&gt;

&lt;p&gt;AnimationBuilder, FutureBuilder, StreamBuilder,…Once you understand them you have no limit. Anything is a widget. A button can use as a screen, a full page used as a button with animation and transformation.&lt;/p&gt;

&lt;h3&gt;
  
  
  9. The customizable kit of widgets
&lt;/h3&gt;

&lt;p&gt;Flutter has built with a rich and customizable set of widgets for Android, IOS and Material Design. The collaboration between Flutter and Google’s material design has rendered and easily create powerful &lt;strong&gt;UI experience.&lt;/strong&gt; This help to create smooth, crisp and refined app experience as are available with a native app.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sUOqhzh7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2A0Is0d6x7zj9qphtdE_JdOQ.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sUOqhzh7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2A0Is0d6x7zj9qphtdE_JdOQ.gif" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Here are a few apps made using flutter framework:-
&lt;/h4&gt;

&lt;h3&gt;
  
  
  1. Google Ads
&lt;/h3&gt;

&lt;p&gt;With Google Ads, you can view your ad campaign stats like impressions, clicks, conversions, manage your bids on campaigns, get real-time alerts and information and get direct support from Google.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.google.android.apps.adwords"&gt;&lt;strong&gt;Google Play Link&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;|&lt;/strong&gt; &lt;a href="https://apps.apple.com/us/app/google-ads/id1037457231"&gt;&lt;strong&gt;App Store link&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NfKbYKAA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AvwqqpfJgVWUpjP-sA5LRtw.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NfKbYKAA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AvwqqpfJgVWUpjP-sA5LRtw.jpeg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Xianyu by Alibaba
&lt;/h3&gt;

&lt;p&gt;Xianyu is being used by more than &lt;strong&gt;50+ million users regularly&lt;/strong&gt; to buy and sell millions of products from an enormous number of categories of products. It helped connect consumers, making the buying and selling process more natural.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=jtYk3gWRSw0"&gt;https://www.youtube.com/watch?v=jtYk3gWRSw0&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. MedRabbits.
&lt;/h3&gt;

&lt;p&gt;MedRabbits is a Home Healthcare service provider. Which aim to bring fast, convenient and cost effective home healthcare at your doorstep.You can search, sort and book from their curated set of home nurses that specialise in elderly care, maternity care and a lot more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.medrabbits.medrabbits"&gt;&lt;strong&gt;Google Play link&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Fklz_R2g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/668/1%2AJgBxI49ZHYawRIx_5oQa1g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Fklz_R2g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/668/1%2AJgBxI49ZHYawRIx_5oQa1g.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Reflectly
&lt;/h3&gt;

&lt;p&gt;Reflectly is an exciting take on a journal app that helps you &lt;strong&gt;store your daily thoughts at one place&lt;/strong&gt; in an orderly manner. Reflectly tries to give you an overview of your past days and &lt;strong&gt;how you’ve improved yourself over time&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.reflectlyApp"&gt;&lt;strong&gt;Google Play link&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;|&lt;/strong&gt; &lt;a href="https://apps.apple.com/us/app/reflectly/id1241229134"&gt;&lt;strong&gt;App Store Link&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RNevSSlG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1000/1%2AUzHjSGqkMmGpGMh53xT9rQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RNevSSlG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1000/1%2AUzHjSGqkMmGpGMh53xT9rQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Watermaniac
&lt;/h3&gt;

&lt;p&gt;Watermaniac is an Android app that helps you keep track of your daily water intake. Using the app, you can set daily goals, know your water intake in the past and be alerted when its time to take the next sip with a notification.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.rmzsoft.watermaniac"&gt;&lt;strong&gt;Google Play link&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aGzTIwuw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/644/1%2AOLAEKnuJvhNfdSyRzgAPIA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aGzTIwuw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/644/1%2AOLAEKnuJvhNfdSyRzgAPIA.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Hamilton
&lt;/h3&gt;

&lt;p&gt;Hamilton is the official app for the hit &lt;strong&gt;American Broadway musical&lt;/strong&gt; , showcasing everything related to Hamilton. The app provides all the latest updates about Hamilton, videos, bits of information, daily trivia, fun stickers for chat, access to merchandise and also gives access to its lottery section for its three cities and tour locations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.hamilton.app"&gt;&lt;strong&gt;Google Play link&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;|&lt;/strong&gt; &lt;a href="https://apps.apple.com/us/app/hamilton-the-official-app/id1255231054"&gt;&lt;strong&gt;App Store link&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rOKKttfH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AmxF392yZqqO9CtwjYGo0xg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rOKKttfH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AmxF392yZqqO9CtwjYGo0xg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In my opinion, Flutter has many more advantages for business and development teams than risks. It’s a great chance to build beautiful, high-performance and outstanding mobile apps that fit your custom needs and requirements. It’s worth considering Flutter, especially if you want an app both for iOS and Android.&lt;/p&gt;




</description>
      <category>flutterapp</category>
      <category>flutter</category>
      <category>appdevelopment</category>
      <category>crossplatformmobilea</category>
    </item>
    <item>
      <title>Flutter — Installation (Windows/MacOS)</title>
      <dc:creator>tkpranav</dc:creator>
      <pubDate>Fri, 08 May 2020 22:02:05 +0000</pubDate>
      <link>https://dev.to/innovationincu/flutter-installation-windows-macos-326a</link>
      <guid>https://dev.to/innovationincu/flutter-installation-windows-macos-326a</guid>
      <description>&lt;h3&gt;
  
  
  Flutter — Installation (Windows/MacOS)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--D4rAzw4H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2A5pPCLEqBWZYrLHNXYfPGAg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--D4rAzw4H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2A5pPCLEqBWZYrLHNXYfPGAg.jpeg" alt=""&gt;&lt;/a&gt;Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for &lt;a href="https://flutter.dev/docs"&gt;mobile&lt;/a&gt;, &lt;a href="https://flutter.dev/web"&gt;web&lt;/a&gt;, and &lt;a href="https://flutter.dev/desktop"&gt;desktop&lt;/a&gt; from a single code base.&lt;/p&gt;

&lt;p&gt;This section is a step by step guide for installing Flutter on your local computer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installation in Windows:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt; − Go to URL,&lt;a href="https://flutter.dev/docs/get-started/install/windows"&gt;https://flutter.dev/docs/get-started/install/windows&lt;/a&gt; and download the latest Flutter SDK. The file is flutter_windows_1.17.0-stable.zip.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---7ex8yHq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AWIvR2uRJkOR8cLU6OPxH3w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---7ex8yHq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AWIvR2uRJkOR8cLU6OPxH3w.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt; − Unzip the zip archive in a folder, say C:\src\flutter\&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt; −Now update the system path to include flutter bin directory.&lt;/p&gt;

&lt;p&gt;Now to access flutter from any terminal, set the SDK path in environmental variables(type “env” in start menu, go to edit environmental variable. Once the env tab is open select path and click edit. Now add your SDK location: here it would be C:/src/flutter/bin).&lt;/p&gt;

&lt;p&gt;So now open your windows terminal and type “ flutter --version”. This would display your flutter version and details, if not verify the env path you have provided.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4&lt;/strong&gt; − Flutter provides a tool, flutter doctor to check whether all the requirement of flutter development is met.&lt;/p&gt;

&lt;p&gt;Type “flutter doctor” on your prompt and it will display the list of completed installations and the pending or error ones.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CMUjhmDi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2Aq19eyO5N-U1TgMAC_OAmMQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CMUjhmDi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2Aq19eyO5N-U1TgMAC_OAmMQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The report says that all development tools are available but the device is not connected. We can fix this by connecting an android device through USB or starting an android emulator.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6&lt;/strong&gt; − Install the latest Android SDK, if reported by flutter doctor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7&lt;/strong&gt; − Install the latest Android Studio, if reported by flutter doctor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 8&lt;/strong&gt; − Start an android emulator or connect a real android device to the system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 9&lt;/strong&gt; − Install Flutter and Dart plugin for Android Studio. It provides startup template to create new Flutter application, an option to run and debug Flutter application in the Android studio itself, etc.,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open Android Studio.&lt;/li&gt;
&lt;li&gt;Click File → Settings → Plugins.&lt;/li&gt;
&lt;li&gt;Search for Flutter plugin and click Install.&lt;/li&gt;
&lt;li&gt;Click Yes when prompted to install the Dart plugin.&lt;/li&gt;
&lt;li&gt;Restart Android studio.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Installation in MacOS :
&lt;/h3&gt;

&lt;p&gt;To install Flutter on MacOS, follow the following steps :&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt; − Go to the URL,&lt;a href="https://flutter.dev/docs/get-started/install/macos"&gt;https://flutter.dev/docs/get-started/install/macos&lt;/a&gt; and download latest Flutter SDK. The file is flutter_macos_1.17.0- stable.zip.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt; − Unzip the zip archive in a folder, say /path/to/flutter&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cd ~/development
$ unzip ~/Downloads/flutter\_macos\_1.17.0-stable.zip
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;If you don’t want to install a fixed version of the installation bundle, you can skip steps 1 and 2. Instead, get the source code from the &lt;a href="https://github.com/flutter/flutter"&gt;Flutter repo&lt;/a&gt; on GitHub, and change branches or tags as needed. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git clone [https://github.com/flutter/flutter.git](https://github.com/flutter/flutter.git) -b stable
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt; − Update the system path to include flutter bin directory (in ~/.bashrc file).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ export PATH="$PATH:`pwd`/flutter/bin"
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4&lt;/strong&gt; − Enable the updated path in the current session using below command and then verify it as well.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source ~/.bashrc
source $HOME/.bash\_profile
echo $PATH
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Flutter provides a tool, flutter doctor to check whether all the requirement of flutter development is met.&lt;/p&gt;

&lt;h3&gt;
  
  
  Run flutter doctor
&lt;/h3&gt;

&lt;p&gt;Run the following command to see if there are any dependencies you need to install to complete the setup (for verbose output, add the -v flag):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ flutter doctor
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This command checks your environment and displays a report to the terminal window. The Dart SDK is bundled with Flutter; it is not necessary to install Dart separately. Check the output carefully for other software you might need to install or further tasks to perform (shown in &lt;strong&gt;bold&lt;/strong&gt; text).For example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MBYatymX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AXZgYPvFzK8CpzIN2CfC8EA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MBYatymX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AXZgYPvFzK8CpzIN2CfC8EA.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5&lt;/strong&gt; − Install latest XCode, if reported by flutter doctor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6&lt;/strong&gt; − Install latest Android SDK, if reported by flutter doctor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7&lt;/strong&gt; − Install latest Android Studio, if reported by flutter doctor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 8&lt;/strong&gt; − Start an android emulator or connect a real android device to the system to develop android application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 9&lt;/strong&gt; − Open iOS simulator or connect a real iPhone device to the system to develop iOS application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 10&lt;/strong&gt; − Install Flutter and Dart plugin for Android Studio. It provides the startup template to create a new Flutter application, option to run and debug Flutter application in the Android studio itself, etc.,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open Android Studio&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Preferences → Plugins&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Select the Flutter plugin and click Install&lt;/li&gt;
&lt;li&gt;Click Yes when prompted to install the Dart plugin.&lt;/li&gt;
&lt;li&gt;Restart Android studio.&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>flutter</category>
      <category>appdevelopment</category>
      <category>flutterappdevelopmen</category>
      <category>flutterinstallation</category>
    </item>
    <item>
      <title>Android Wireless Debugging (Flutter + MAC + VsCode)</title>
      <dc:creator>NIBRAS NAZAR</dc:creator>
      <pubDate>Fri, 08 May 2020 13:23:27 +0000</pubDate>
      <link>https://dev.to/innovationincu/android-wireless-debugging-flutter-mac-vscode-28jn</link>
      <guid>https://dev.to/innovationincu/android-wireless-debugging-flutter-mac-vscode-28jn</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2E4G1rYn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2ABxX2fvhmNvpj21i13nlC4w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2E4G1rYn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2ABxX2fvhmNvpj21i13nlC4w.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This article is purely for Mac Users who develop flutter apps in MacBook with VScode.&lt;/p&gt;

&lt;p&gt;Follow the steps below to get done.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 1: Install ADB
&lt;/h4&gt;

&lt;p&gt;ADB stands for “Android Debug Bridge,” and it is a command-line tool that is used to communicate with a smartphone, tablet, smartwatch, set-top box, or any other device that can run the Android operating system (even an emulator). The computer with ADB can send commands to our device through the USB cable and wirelessly for debugging&lt;/p&gt;

&lt;p&gt;the easiest way to install ADB is&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install homebrew
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ruby -e "$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/master/install](https://raw.githubusercontent.com/Homebrew/install/master/install))"
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Install ADB
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew cask install android-platform-tools
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;run adb --versioncommand in terminal to ensure ADB has been installed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5Frhyvlg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/637/1%2ANYq7RM0bjwVxCFlET7LQBA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5Frhyvlg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/637/1%2ANYq7RM0bjwVxCFlET7LQBA.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2: Install ADB interface for VScode
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Search for ADB interface in the Extensions of VScode&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JRJXtHVv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/976/1%2AjlUuuAI4CMiNPEOGJJPR1Q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JRJXtHVv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/976/1%2AjlUuuAI4CMiNPEOGJJPR1Q.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select the above Extension and install&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Step 3: Wireless debugging
&lt;/h4&gt;

&lt;p&gt;Before we start wireless debugging make sure that your android phone is in developer mode and “debugging” and “wireless debugging” options are toggled on.&lt;/p&gt;

&lt;p&gt;Also, both the computer and android device must be connected to the same WiFi.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---1jGMbZf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AnPmzgLIqFr1NyGsnmltJUQ.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---1jGMbZf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AnPmzgLIqFr1NyGsnmltJUQ.jpeg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now follow the steps given below…&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open VScode&lt;/li&gt;
&lt;li&gt;Connect an Android device to the computer using a USB cable&lt;/li&gt;
&lt;li&gt;Open Command Palette ( command + shift + P)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cqfcj7ry--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1017/1%2A_YM-gl4nIC03gCt0VoowZg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cqfcj7ry--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1017/1%2A_YM-gl4nIC03gCt0VoowZg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Select the commands given below from the command palette&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;‘&lt;em&gt;ADB: Disconnect from any device’&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;‘ADB: Reset connected devices port to:5555&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Now disconnect the Android device from the computer and Select the command below from the Command Palette&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;‘ADB: Connect to device IP’&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Enter the IP address of the Android device when prompted&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--952a5Tcz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1015/1%2A0lJmTIJAGZe5ADY97hLCYQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--952a5Tcz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1015/1%2A0lJmTIJAGZe5ADY97hLCYQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(you can find the IP address of the android device from its *settings&amp;gt;status )&lt;/p&gt;

&lt;p&gt;You may have to wait for a while to start.&lt;/p&gt;

&lt;h4&gt;
  
  
  Enjoy Android wireless debugging……………
&lt;/h4&gt;




</description>
      <category>mac</category>
      <category>androiddebugbridge</category>
      <category>vscode</category>
      <category>flutter</category>
    </item>
    <item>
      <title>Agora.io: Creating a Basic Video Chat Room.</title>
      <dc:creator>tkpranav</dc:creator>
      <pubDate>Thu, 30 Apr 2020 12:56:23 +0000</pubDate>
      <link>https://dev.to/innovationincu/agora-io-creating-a-basic-video-chat-room-425n</link>
      <guid>https://dev.to/innovationincu/agora-io-creating-a-basic-video-chat-room-425n</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HtJmCc7q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2ARwouyic9YxmK_GWtzIhH6A.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HtJmCc7q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2ARwouyic9YxmK_GWtzIhH6A.jpeg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this tutorial, I’m showing about how to create your own video chat room with agora.io.&lt;/p&gt;

&lt;p&gt;We all make many Apps websites etc.., Now think about integrating a video chat room in your own app or website. You can do it with the help of agora. Here I will explain a short method to do all the stuff easily.&lt;/p&gt;

&lt;p&gt;First of all what is Agora.io ??&lt;/p&gt;

&lt;p&gt;Agora.io provides a simple and powerful SDK in which you can real-time voice and video communications. We can make the Agora SDK integrate into our websites to enable real-time communications.&lt;/p&gt;

&lt;p&gt;Agora is perfect when embedded in social engagement apps.&lt;/p&gt;

&lt;p&gt;You can also apply animated stickers, magic mirror and color filters. Take control of everything from UI to stream size and support third-party add-ons like filter, encryption, facial recognition, emojis, and more.&lt;/p&gt;

&lt;p&gt;Agora also provides much documentation for developers to use Agora SDKs and sample codes. You can check it &lt;a href="https://docs.agora.io/en"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Agora provides the first 10,000 minutes free each month. It can be customized easily and easy to implement.&lt;/p&gt;

&lt;p&gt;Agora.io mainly Provides,&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Video SDK&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Voice SDK&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Gaming SDK&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;RTM SDK&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Recording Add-on&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.agora.io/en/Agora%20Platform/agora_platform?platform=All%20Platforms"&gt;&lt;strong&gt;Click here&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;to&lt;/strong&gt; see the Agora Platform Overview.&lt;/p&gt;

&lt;h3&gt;
  
  
  Now Lets Start Building the VideoChat Room
&lt;/h3&gt;

&lt;p&gt;First of all, you should create an account at Agora.io&lt;/p&gt;

&lt;p&gt;&lt;a href="https://console.agora.io/"&gt;&lt;strong&gt;Click here&lt;/strong&gt;&lt;/a&gt; to create an account.&lt;/p&gt;

&lt;p&gt;You can log in with Gmail, Github, Cocos, and even with your email.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JWphdRW1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/954/1%2A6A_7lKXon8_NpTuQ4QjVxA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JWphdRW1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/954/1%2A6A_7lKXon8_NpTuQ4QjVxA.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enter your desired project name and then submit. Now your first project is created.&lt;/p&gt;

&lt;p&gt;we have now created the project to collect the APPID. We will discuss what is APPID and its uses in this Later.&lt;/p&gt;

&lt;p&gt;Now create your own sample website to implement Agora SDK .&lt;/p&gt;

&lt;p&gt;This will be the structure of the Application we are developing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
├── index.html&lt;br&gt;&lt;br&gt;
├── &lt;strong&gt;scripts&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
│ ├── AgoraRTCSDK-3.0.2.js(&lt;em&gt;Version may vary, check the latest version&lt;/em&gt;)&lt;br&gt;&lt;br&gt;
│ └── script.js&lt;br&gt;&lt;br&gt;
└── &lt;strong&gt;styles&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
└── style.css&lt;/p&gt;

&lt;p&gt;You should download the latest Agora.io SDK for the Web. &lt;a href="https://docs.agora.io/en/Agora%20Platform/downloads"&gt;&lt;strong&gt;Click here&lt;/strong&gt;&lt;/a&gt; to Download.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;At First , copy the AgoraRTCSDK-3.0.2.js file which is downloaded to the scripts folder.&lt;/li&gt;
&lt;li&gt;And then set up the index.html file by adding the scripts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Then set up the page.html file in the same way.&lt;/li&gt;
&lt;li&gt;Next, go to the &lt;a href="https://console.agora.io/"&gt;&lt;strong&gt;Agora.io Console&lt;/strong&gt;&lt;/a&gt; and collect the APP ID.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To get the APP ID, follow these steps&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate in the Dashboard tree on the left to Projects &amp;gt; Project List.&lt;/li&gt;
&lt;li&gt;Save the App ID from the Dashboard&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now paste the APP ID to the scripts.js folder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UKh1sG8e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/872/1%2AoTq9QfU4xoM6hIK4MWCAlg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UKh1sG8e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/872/1%2AoTq9QfU4xoM6hIK4MWCAlg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don’t forget to paste the APP ID you have got. The next step is opening it up.&lt;/p&gt;

&lt;p&gt;Type npx serve in the terminal and create a lite server and open it with that the URL.&lt;/p&gt;

&lt;p&gt;I have shared the Screenshot of my project below :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ehBkNxuG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2ATLfINdsUwBp4yWEFO139Ng.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ehBkNxuG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2ATLfINdsUwBp4yWEFO139Ng.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now if you guys click the “join for free” button you will be redirected to another page where the microphones and camera permissions are to be provided.&lt;/p&gt;

&lt;p&gt;Your camera will be opened and you can see yourself (if not wait for a few seconds for loading).&lt;/p&gt;

&lt;p&gt;Now paste the same URL on another tab and join.So that we can fake a remote user join.&lt;/p&gt;

&lt;p&gt;And now you would see two faces of yours.(as the remote user is also yourself.)&lt;/p&gt;

&lt;p&gt;So by following these simple steps with the help of agora.io you can implement video chat into your own website successfully.&lt;/p&gt;




</description>
      <category>rtc</category>
      <category>videocalling</category>
      <category>live</category>
      <category>agora</category>
    </item>
    <item>
      <title>Flask: Before and After request Decorators</title>
      <dc:creator>NIBRAS NAZAR</dc:creator>
      <pubDate>Thu, 30 Apr 2020 12:53:40 +0000</pubDate>
      <link>https://dev.to/innovationincu/flask-before-and-after-request-decorators-5320</link>
      <guid>https://dev.to/innovationincu/flask-before-and-after-request-decorators-5320</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t75cZSCl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/640/1%2AO0S2-UBv_Y1RRgHgRkg1yQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t75cZSCl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/640/1%2AO0S2-UBv_Y1RRgHgRkg1yQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In addition to static and dynamic routes to functions/views using the @app.route() decorator, Flask empowers us with several powerful decorators to supplement the routes we create with .route(). In this article, we will look at some ways to run functions before and after a request in Flask using the decorators&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;before_request&lt;/li&gt;
&lt;li&gt;after_request&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;before explaining those, let’s write a very basic flask application&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from flask import Flask

app = Flask(\_\_name\_\_)

@app.route("/")
def index():
    print("Index running!")

if \_\_name\_\_ == "\_\_main\_\_":
    app.run()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;So whenever a request to the root &lt;em&gt;(“/”)&lt;/em&gt; is made, we would see the output shown below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Index running!
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We make use of before_request and after_requestIf we want any specific task to get executed before and after the request respectively.&lt;/p&gt;

&lt;h3&gt;
  
  
  before_request
&lt;/h3&gt;

&lt;p&gt;The before_request decorator allows us to execute a function before any request. i.e, the function defined with the .before_request() decorator will execute before every request is made.&lt;/p&gt;

&lt;p&gt;We can do this by decorating a function with @app.before_request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@app.before\_request
def before\_request\_func():
    print("before\_request executing!")
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;after adding this function, we get the following output whenever we try to make a request to the route (“/”).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;before\_request executing!
Index running!
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;we can make use of this function in cases like :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Opening database connections.&lt;/li&gt;
&lt;li&gt;tracking user actions&lt;/li&gt;
&lt;li&gt;adding a “back button” feature by remembering the last page the user visited before loading the next&lt;/li&gt;
&lt;li&gt;determining user permissions, etc……&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;before_request are not required to return anything, however, If a before_request function returns a value, it will be considered as if it was the return value for the view and any further request handling is stopped.&lt;/p&gt;

&lt;h3&gt;
  
  
  after_request
&lt;/h3&gt;

&lt;p&gt;The after_request decorator works in the same way as before_request decorator, except, It allows us to execute a function after each request.&lt;/p&gt;

&lt;p&gt;let us see an example by adding this function to our application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@app.after\_request
def after\_request\_func(response):
    print("after\_request executing!")
    return response
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;by making a request to any route on our application we would see the following output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;before\_request executing!
Index running!
after\_request executing!
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;after_request functions must take and return an instance of the Flask response class.&lt;/p&gt;

&lt;p&gt;this function can be used in cases like :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;close a database connection&lt;/li&gt;
&lt;li&gt;To alert the user with changes in the application, etc….&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Any functions decorated with after_request will NOT run if the application throws an exception.&lt;/p&gt;

&lt;h4&gt;
  
  
  Our application :
&lt;/h4&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from flask import Flask

app = Flask(\_\_name\_\_)

@app.before\_request
def before\_request\_func():
    print("before\_request executing!")

@app.after\_request
def after\_request\_func(response):
    print("after\_request executing!")
    return response

@app.route("/")
def index():
    print("Index running!")

if \_\_name\_\_ == "\_\_main\_\_":
    app.run()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;for more you can visit the flask documentation page here &lt;a href="https://flask.palletsprojects.com/en/1.1.x/"&gt;https://flask.palletsprojects.com/en/1.1.x/&lt;/a&gt;&lt;/p&gt;




</description>
      <category>flask</category>
      <category>decorators</category>
      <category>python</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to Write a useful Commit Message: A Git Guide</title>
      <dc:creator>NAEEM HADIQ</dc:creator>
      <pubDate>Thu, 30 Apr 2020 11:23:15 +0000</pubDate>
      <link>https://dev.to/innovationincu/how-to-write-a-useful-commit-message-a-git-guide-5c8e</link>
      <guid>https://dev.to/innovationincu/how-to-write-a-useful-commit-message-a-git-guide-5c8e</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxtmbt9l1xne2qze2m7it.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxtmbt9l1xne2qze2m7it.jpeg" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's start with what commit messages are, they basically are messages or tags given along with a commit statement in git so that reviews are easier and the version log is understandable.&lt;/p&gt;

&lt;p&gt;To create a successful and understandable revision history teams must agree upon a common commit convention to use in the project, in the present scenario even personal projects would really be easier with such conventions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Introduction to version control with Git
&lt;/h3&gt;

&lt;p&gt;Version control refers to maintaining the source code and the software with a history log in stages. It is an unavoidable tool in all modern-day industries.&lt;/p&gt;

&lt;p&gt;By far, &lt;a href="https://git-scm.com/" rel="noopener noreferrer"&gt;Git&lt;/a&gt; is the most widely used version control system in the world. It is a distributed and actively maintained open source project originally developed in 2005 by &lt;a href="https://en.wikipedia.org/wiki/Linus_Torvalds" rel="noopener noreferrer"&gt;Linus Torvalds&lt;/a&gt;, the famous creator of the Linux operating system kernel.&lt;/p&gt;

&lt;p&gt;New to Git? Check out the official &lt;a href="https://git-scm.com/book/en/v1/Getting-Started" rel="noopener noreferrer"&gt;getting started guide&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is a commit message?
&lt;/h3&gt;

&lt;p&gt;The commit command is used to save changes to a local repository after staging in Git. However, before you can save changes in Git, you have to tell Git which changes you want to save for easier backtracking as you might have made tons of edits. A great way to do that is by adding a commit message to identify your changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Commit Options
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;-m&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This option adds a message to commit for easier understanding&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add \*
git commit -m 'new medium blog added'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;a or — all&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This option adds all existing tracked including new and edited&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -a -m "corrected medium blog"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;— amend&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This option overwrites the last commit with the present staged changes. This should only be done before you push the staged commits to the server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit --amend -m "overwrite previous blog"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why should you write good commit messages?
&lt;/h3&gt;

&lt;p&gt;You might wonder why to write a good commit message because it's only you or only your team who understand and know what each other is committing. Just imagine a new team working on your project or expanding your team to a scale where each other do not know what you are committing.&lt;/p&gt;

&lt;p&gt;A well-crafted Git commits message is the best way to communicate context about a change to other developers working on that project, and indeed, to your future self.&lt;/p&gt;

&lt;p&gt;Have you ever tried running git log on one of your old projects to see the “weird and funny ” commit messages you have used since its inception? It can be hard to understand why you made some changes in the past or what some commits even where, you would wish to have known about the techniques earlier.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to write commit messages with Git
&lt;/h3&gt;

&lt;p&gt;By now you would have understood the commit message format and its syntaxes.&lt;/p&gt;

&lt;p&gt;giving smthing like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m 'Fix:added y to x'

or

git commit -m 'Fix Typo in readme.md'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Would be understandable on smaller fixes but in case of more detailed fixes this would not work out well&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Adding a Detailed Commit message&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Command line method&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m 'Fix:xyz bug' -m 'Added Moderator to solve xyz bug in main.py'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first -m option is the subject (short description/Title), and the next is the extended description (body).&lt;/p&gt;

&lt;h3&gt;
  
  
  How to write good commit messages
&lt;/h3&gt;

&lt;p&gt;There are several conventions used by different teams and developers to write good commit messages. I’ll only outline some general rules and tips for writing commit messages–you have to decide what convention you want to follow. And if you work for a company or contribute to open source, you have to adapt to their convention.&lt;/p&gt;

&lt;p&gt;For consistency, you can use one convention for work and another for personal projects as you might change jobs sometime, and the convention might also change.&lt;/p&gt;

&lt;p&gt;Be sure to check out &lt;a href="https://hashnode.com/post/which-commit-message-convention-do-you-use-at-work-ck3e4jbdd00zyo4s1h7mc7e0g" rel="noopener noreferrer"&gt;this thread&lt;/a&gt; for some amazing commit message conventions or add yours to help someone make a decision.&lt;/p&gt;

&lt;p&gt;Here’s a great template of a good commit message originally written by &lt;a href="https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html" rel="noopener noreferrer"&gt;Tim pope&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Capitalized, short (50 chars or less) summary

More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body. The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.

Write your commit message in the imperative: "Fix bug" and not "Fixed bug"
or "Fixes bug." This convention matches up with commit messages generated
by commands like git merge and git revert.

Further paragraphs come after blank lines.

- Bullet points are okay, too

- Typically a hyphen or asterisk is used for the bullet, followed by a
  single space, with blank lines in between, but conventions vary here

- Use a hanging indent

If you use an issue tracker, add a reference(s) to them at the bottom,
like so:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Looks great, right? Here’s how you can make yours great too:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Specify the type of commit:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;feat: The new feature you’re adding to a particular application&lt;/li&gt;
&lt;li&gt;fix: A bug fix&lt;/li&gt;
&lt;li&gt;style: Feature and updates related to styling&lt;/li&gt;
&lt;li&gt;refactor: Refactoring a specific section of the codebase&lt;/li&gt;
&lt;li&gt;test: Everything related to testing&lt;/li&gt;
&lt;li&gt;docs: Everything related to documentation&lt;/li&gt;
&lt;li&gt;chore: Regular code maintenance.[You can also use emojis to represent commit types]&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Separate the subject from the body with a blank line&lt;/li&gt;
&lt;li&gt;Your commit message should not contain any whitespace errors&lt;/li&gt;
&lt;li&gt;Remove unnecessary punctuation marks&lt;/li&gt;
&lt;li&gt;Do not end the subject line with a period&lt;/li&gt;
&lt;li&gt;Capitalize the subject line and each paragraph&lt;/li&gt;
&lt;li&gt;Use the imperative mood in the subject line&lt;/li&gt;
&lt;li&gt;Use the body to explain what changes you have made and why you made them.&lt;/li&gt;
&lt;li&gt;Do not assume the reviewer understands what the original problem was, ensure you add it.&lt;/li&gt;
&lt;li&gt;Do not think your code is self-explanatory&lt;/li&gt;
&lt;li&gt;Follow the commit convention defined by your team&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;The most important part of a commit message is that it should be clear and meaningful. In the long run, writing good commit messages shows how much of a collaborator you are. The benefits of writing good commit messages are not only limited to your team, but indeed expand to yourself and future contributors.&lt;/p&gt;

&lt;p&gt;Want to learn more about Git and become a professional “version controller”? Check out these excellent resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://try.github.io/" rel="noopener noreferrer"&gt;https://try.github.io/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git-scm.com/book/en/v2" rel="noopener noreferrer"&gt;https://git-scm.com/book/en/v2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.git-tower.com/learn/" rel="noopener noreferrer"&gt;https://www.git-tower.com/learn/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learngitbranching.js.org/" rel="noopener noreferrer"&gt;https://learngitbranching.js.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/commitizen/cz-cli" rel="noopener noreferrer"&gt;https://github.com/commitizen/cz-cli&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>workflow</category>
      <category>teamwork</category>
      <category>development</category>
      <category>git</category>
    </item>
  </channel>
</rss>
