Flutter: FilteringTextInputFormatter Examples

August 31, 2021 A Goodman

This article walks you through a few practical examples of using FilteringTextInputFormatter to blacklist or whitelist certain characters when the user enters text into the TextField (or TextFormField). Without any further ado, let’s dive into the…

Flutter: 2 Ways to Run a Piece of Code after a Delay

August 30, 2021 A Goodman

This article demonstrates 2 different ways to execute a piece of code after a delay in Flutter. The first approach is to use Future.delayed and the second one is to use a timer. Without any further…

Flutter: Caching Network Images for Big Performance gains

August 27, 2021 A Goodman

The goodness of caching network images in a Flutter application does more than just boot up the performance of the application itself. Other significant benefits are: Reduce the burden on your server and reduce the cost…

Flutter: How to Colorize Debug Console Logs

August 26, 2021 A Goodman

Introduction Logging messages in different colors makes fixing bugs and developing apps with Flutter more fun and enjoyable. This article will show you how to do that without using any third-party plugins. Overview To output colored…

Prevent VS Code from Auto Formatting Flutter/Dart Code

August 24, 2021 A Goodman

By default, VS Code (Visual Studio Code) will automatically format your code when you save a Dart file. In general, this feature is useful and makes your code cleaner, and has a consistent arrangement. However, there…

Flutter: Disabling Android System Back Button

August 24, 2021 A Goodman

There might be cases where you want to programmatically disable the Android system back button on some specific screens in a Flutter application. This article shows you how to do it. What Is The Point? To…

Flutter: Reading Bytes from a Network Image

August 25, 2021 A Goodman

The example below shows you how to read bytes from a network image in Flutter. The code: Output: Further reading: Flutter: How to Read and Write Text Files How to encode/decode JSON in Flutter Base64 encoding…

Flutter: 2 Ways to Compare 2 Deep Nested Maps

August 22, 2021 A Goodman

2 maps are considered equal if they have the same length, and contain the same keys associated with the same values. This article shows you 2 ways to correctly compare 2 deep nested maps in Flutter….

Dart: Converting a List to a Map and Vice Versa

August 19, 2021 A Goodman

In this article, we will go over a couple of different ways to convert a list to a map as well as turn a map into a map in Dart. Without any further ado, let’s dive…

Dart: Checking whether a Map is empty

August 17, 2021 A Goodman

In Dart, you can check if a given map is empty in several ways. The most convenient approaches are to using the isEmpty, isNotEmpty, or length properties. Example: Output: Further reading: Dart: Checking if a Map…

Dart: Checking if a Map contains a given Key/Value

August 17, 2021 A Goodman

Dart provides us the tools to quickly check whether a map contains a given key or value. These tools are the containsKey() method and containsValue() method. Example: Output: Further reading: Dart: How to Add new Key/Value…

Dart: How to Add new Key/Value Pairs to a Map

August 17, 2021 A Goodman

This short article shows you a few ways to add new key/value pairs to a given map in Dart (and Flutter as well). Using map[newKey] = newValue syntax Example: Output: Using addAll() method This method can…

1 2 3 4 26