Category: Tutorial

  • What is the use of for in Python?

    In the previous section, we have discussed the if statement. In this section we will learn how to use a for loop in python. We have been discussing the control flow in python. However, the for statement in python differs from other for statements used in languages like C, or Pascal. If you come from…

  • How do you write an if statement in Python?

    Whenever we think about control flow, perhaps the most well known statement type is the if statement. Why? We’ll see. If you come from other languages, you may have used “else if” with the “if” statement. Right?  However, python is an exception in this case. Python uses “elif” in place of “else if”. Usually, the…

  • What is forEach in Flutter? E Com App 22

    We can use the forEach loop with any type of collection in Flutter. In Dart we have seen many types of implementations. The e-commerce app we have been building has many parts. We have used the Provider package to provide values and notify listeners. However, every component like product, cart and order has a unique…

  • What does override do in Flutter?

    Either in a Stateful or in a Stateless widget, we always see the annotation override before the build() method. Right?  Have you ever thought about what does the annotation override mean? Moreover, is it necessary at all? Let’s consider a Dart class to see its implementation first. After that we will discuss the code. If…

  • Is Flutter same as Dart?

    We use Dart programming language to code Flutter apps. Therefore, certainly Flutter is not Dart. But we need Dart for Flutter. Why do we ask this question? Because a beginner, who has not coded before, always wants to learn the purpose. Although we use the Dart programming language for web  development yet Dart is popular…

  • What is Dart Constructor?

    A Dart constructor is a special function that initialises the variables in the class. Dart uses the class name to name the constructor. Besides, since a constructor is a function, we can pass parameters through it.  However, the number of parameters may vary. Number of parameters changes with the number of the variables. We will…

  • What is get and set in Flutter?

    As the name suggests, we use the get and set method in Flutter for security purposes. Actually to get the value of a private variable. In our previous discussion we have seen how we can make a member variable private. Why? Because no one can manipulate this variable outside this class. As a result, we…

  • What is private variable in Dart?

    We declare a private variable in Dart by the (_) sign inside a class. Like variables, we can also make a method private.  Dart doesn’t have keywords like, public, private or protected. But why do we need to make a variable private? There are many reasons to do that.  One of the reasons is with…

  • Dart math min examples, E Com App 21

    When do we need to use the Dart “math” library in Flutter? Not only that, we also use the min method to find the smallest number. Basically the Dart min method passes two numbers as arguments and returns the smallest one. The e-commerce app, which we have been building, has gone through a lot of…

  • App Drawer Flutter, E Com App 20

    What is an App Drawer in Flutter? In short, it helps us to navigate to another page. But how does it help us in the e-commerce app? We’ll try to answer this question in this section. Before explaining the App Drawer, we must describe why we need it. Right?  Firstly, in any Material Design we…

  • Push replacement named Flutter, E Com App 19

    The push replacement named is a navigation method. We will see how it works and why we need it, in a minute. However, before that we would like to explain it. Why do we need this particular method in the E Commerce app?  Firstly, we have seen how we can manage our orders. And to…

  • Flutter list firstWhere method, E Com App 16

    There are many useful methods in Dart which we use in Flutter. Especially when we build apps. One of such methods is firstWhere method. In this section we will learn how and when we will use this dart list method in our on-going E Commerce app. Firstly, we have been building this E Commerce app…

  • Product details Flutter, E Com App 15

    In any Flutter e-commerce app, the product detail page plays a vital role. For example, we get every detail about the product. Firstly, it allows users to view the product from every angle, judging the quality.  Secondly this product detail page displays the price, description of the product adding other features as well. While building…

  • How to remove list item in Flutter, E Com App 14

    Suppose users have added a few items to the cart. But how will they remove a list item in Flutter by dragging them?  In flutter we can dismiss a list item by dragging in the indicated direction. When we drag this list item widget in the DismissDirection, it causes the child to slide out of…

  • Flutter E Commerce App Design -Section 13

    In this section, we will take a look at the design part of the e-commerce app. UI or design plays an important role in building Flutter apps.  In the previous section we have added a Cart Model. However, to nest a new Provider model class, we need to use the multi provider property of the…

  • Flutter Map in Cart Model, E Com app 12

    As we said, List and Map play an important role in Flutter. While adding Cart items in an e-commerce app, we need a special Map method. We’ll discuss that in a minute. So far we have progressed and learned a few things while building the e-commerce app. Most importantly, we have learned how to display…

  • Flutter app and Artificial Intelligence

    Can we use artificial intelligence in the Flutter app? Yes, we can. We can make Artificial Intelligence Apps using Flutter.  Not only that, we can use Flutter as a part of a Machine Learning tool also.  How can we do that? We can do that with the TensorFlow Lite package.  What is TensorFlow? Firstly, we…

  • When to use Stateful Widget in Flutter, E Com App 11

    When do we use stateful widget in flutter? We’ll discuss. Before that, let’s understand what a StatefulWidget means. As the name suggests, a stateful widget has a mutable state. In short, a widget that changes the user interface when a user interacts with the widget. For example the user presses a button and a section…

  • Pop Up Menu in Flutter, E Com App 10

    As a Flutter developer our final goal is to give a better user experience. Right? For that we need a pop up menu.  As the name suggests this button will pop up some menus.  Firstly, why do we need it? Secondly we will discuss how we can manage the local state to make this happen.…

  • Consumer Flutter Provider, E-Com App 9

    When to use Flutter Provider Consumer and why? In this section we will take a quick look at how we can avoid widget-rebuilds. In our previous section we have seen why we use ChangeNotifierProvider value constructor. However, at the same time, we have used Provider Consumer in our Product Item controller.  As a result, in…

  • Nested Provider Flutter, E-Com App 8

    Firstly in this section we will try to understand the concept of the nested provider in Flutter. We will see why we use it. Secondly we will know how we can use a nested provider to enhance the performance of our E-Commerce app? Finally we will show you the advantage of the nested provider in…