Skip to main content

2 posts tagged with "dart"

View All Tags

· 8 min read

Futures are very popular in Dart and Flutter. If you have previously written code in Dart, you must have already seen Future. If you don't completely understand what Future is and how to use it in Dart and Flutter then this article is for you. Even if you know what it is and are using it already this article might be beneficial for you to get deeper understanding. Futures are one of the ways to deal with asynchronous computation in Dart and Flutter. Flutter also provides FutureBuilder that allows to get data from a Future and present it easily in the Widget tree. Before talking anymore about Future and FutureBuilder, let's step back and look at whah asynchronous programming is and why we do need Future.

· 2 min read

Introduction

Singleton is a design pattern and is one of the simplest ones. It is useful in the cases when we want only a single instance of any object in our application. In this tutorial we will learn about the singleton pattern in Dart and how we can create a singletons in Dart. So let's get started