Category: Dart

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

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

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

  • Abstract class in Flutter, E-Com App 8

    In Dart and Flutter we can extend a class. That’s inheritance. However, we can also extend an abstract class in Flutter. The concept of abstract class plays an important role in Flutter app development. Just like the “mixin”. We’ve seen the difference between mixin and extend in Flutter in the previous section. As a result,…

  • How to use ternary operator in Flutter

    In the previous section, we have seen how the ternary operator works. In this section we will learn how to use it in Flutter. Just like if-else control flow it works. The ternary operator reduces the code line firstly. And, secondly, it enhances the readability. Let us see, an example in Dart. Then we will…

  • Truth table in Dart and Flutter

    We will learn three very important concepts in Dart and Flutter. Firstly, what is truth table. Secondly, how to use truth table. And, finally, why we need truth table. First thing first. What is truth table? Any type of programming language has a close relationship with Discrete Mathematics. The truth table is a discrete mathematical…

  • Why we need enum in Flutter

    The enum is the short form of enumerated type. Therefore, enum is just like any other data type. Moreover, enum is a set of named values that we call elements or enumerators. As a result, we can use enum “Type” value where we want them. And, enumerator names act as constant values. In Natural Language…

  • What is null and void in Dart, Flutter

    Although in natural language the idiom “Null and Void” means practically nothing, yet in programming world of Dart and Flutter it means a lot.

  • Dart and Flutter, Imperative, or Declarative

    Flutter is an out and out declarative. However, Dart programming language uses both programming paradigms. Imperative and Declarative.

  • What are first-class functions

    We can store a function as a value in a variable, pass the value as parameter or return the value which points the function from a function.

  • Dynamic List in Dart and Flutter

    New languages come up to solve many problems. In Dart, we get two types of List. One is Fixed length. Another is growable or dynamic List.

  • What is void callback in flutter

    Since Dart has First-class functions and treat function like any other variable, we can pass it through a Widget. Yes, we want to pass the function as a variable.

  • Dart Math library in Flutter

    Dart Math library is extremely powerful and we can do any kind mathematical operations with the help of this library. In Flutter, it plays equally important role.

  • Flutter final vs const : the difference

    There is a lot of difference between final and const keywords. In any Flutter App we use the both variables frequently. So we need to understand the difference.

  • How does a function return a Type

    When a function returns a Widget, that means a lot for any Flutter App. It makes our code reusable, and adaptable.

  • How to use variable in Flutter

    If we do not initialize the variable in Dart and Flutter, we must declare the Type.

  • What is static in Flutter

    We can access the class variables and methods using the static keyword in Flutter and Dart.

  • How to make Virtual Device in Android Studio Faster

    We need to follow a few simple steps to make the Virtual Device in Android Studio faster.