Category: State Management

  • 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…

  • 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…

  • 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…

  • Manage State in Flutter, E-Com App 5

    Two questions always haunt Flutter beginners. What is the State of Flutter? And, how to manage the State of Flutter? As we’ve building an ecommerce app from scratch, we should answer these questions at the very beginning. Otherwise we cannot follow the workflow of code. However, we won’t take much time.  Because we have a…

  • Navigation in Flutter, E-Commerce App 3

    Although we’ve discussed navigation in Flutter before, it’s still relevant in our e-commerce app. Firstly, we’ve seen how we can manage themes across the app with the latest Material You design.  Secondly, we have managed to display products on our home page with the help of a provider package. Therefore we have gone over the…

  • Flutter backend local, E Commerce app – 2

    We’ve discussed how to use Flutter backend before. There are several options. Using a local file is certainly one of them.  In this e-commerce app, we’re going to use local files as well. As a result, what we’re displaying as products on the home page, are objects that we’ve instantiated locally. As the first step,…

  • Flutter app development, E Commerce App first step

    In our previous section we have an introduction to Flutter app development. We’ll build an e commerce app, step by step. In the beginning we used a simple theme. As a result, we have our first screenshot like the following. We can take a look at the first branch where we have the initial code.…

  • E Commerce App in Flutter, A Step by Step Guide

    How to build an E Commerce app in Flutter from scratch? We will try to do it step by step.  However, it will certainly take some time. Because we are trying to build this E Commerce Flutter app in a way, so that a beginner might understand the steps. However, if you have already done…

  • Build in Flutter, Without set state and Stateful Widget

    How does the build method work in Flutter? In this section we’ll take a look at the core concept of Flutter. In our previous section we have seen a simple Stateful widget where we have used a counter to press the button and change the internal state of the object. As a result, it calls…

  • Set State in Flutter, build method and Internal State

    What does the set state method mean in Flutter? In this section we’ll try to understand the topic from a beginner’s point of view.  If you have enough experience in Flutter, you may skip this section. Or, applying your experience if you find any inconsistency in this explanation, please express your view in the comment…

  • Value Notifier Flutter and Material Design 3

    In our previous Firebase, Provider Blog app section, we have used Material Design 3 to customise the theme. However, at the entry point of our Flutter app, we’ve also used the ValueNotifier class.  Certainly, in our Flutter app, the ValueNotifier class plays an important role to customize the theme across the whole widget tree. Now…

  • Animated text kit flutter : Tiny Flutter Apps

    How do you make animated text in Flutter? Certainly we can use different types of animation widgets that flutter supplies. However, the easiest way is to use the animated text kit. Animated text kit is a flutter plugin, or package, whatever you want to name it. The animated text kit package makes our life easier…

  • Flutter WebView : design TabBar, final step

    In our previous section we have seen how we can use Flutter WebView widget with TabBar. However, you’ve probably noticed that the TabBar design is not up to the mark. In addition, we cannot display the application’s title as we wanted to do. Therefore, in this section we will work on them.  Let’s see the…

  • WebView in Flutter : Adding TabBar, Step 2

    We have been using webview in flutter to display web content on the screen. However, in our previous section we have just learned how to use webview in flutter. Now we want to add some more style to our flutter app. As a result, we want to use the TabBar widget. We use TabBar inside…

  • WebView Flutter : Flutter Today App Step 1

    What does a WebView in Flutter do? Certainly it displays web content on the mobile screen. But does its job end there? Or, will we just display web content on the screen? No.  We can use the WebView plugin to add the webview Widget. In addition, we can design our Flutter app. We can add…

  • Timer Flutter : How to countdown starts and ends

    Flutter has a Timer class that we can configure. As a result, we can either start it, stop it or resume it. When a timer in flutter works it actually starts a countdown. As we know, in many cases, we need a timer to start a countdown in a flutter app. We can see a…

  • List.generate Flutter : Expense Checker App Final step

    In the final step of the expense checker app we will discuss a key concept. List.generate constructor in Flutter. Firstly, List.generate constructor generates a list of values.  Secondly, the List.generate constructor creates the list with length position. That means the constructor fills up the list with values from index 0 but ends at the one…