Flutter: 2 Ways to Create Gradient Background Buttons (2021)
This article shows you a few ways to make buttons with gradient background colors in Flutter without causing side effects like missing ripple effect or producing unwanted borders. We’ll walk through 2 different examples. The first…
Flutter: Make a TextField Read-Only or Disabled
This article shows you how to make a TextFiled read-only or disabled in Flutter. Overview If a TextField is disabled, it can not be focused and ignores taps. We can control whether a TextField is disabled…
Flutter: Adding a Clear Button to a TextField (2021)
This article shows you how to add a clear button to a TextField in a Flutter application so that a user can quickly remove the text he or she has entered. What is the point? We’ll…
Flutter: Add a Character Counter to TextField
This article shows you how to add a custom character counter to a TextField (you can also use TextFormField as well) in Flutter. Overview 1. We will display the number of characters entered (including the spaces…
Flutter & Dart: Get File Name and Extension from Path/URL
This article shows you how to retrieve the name and extension of a file from a file path or a web URL in Dart (and Flutter as well). In order to get the job done, we…
Node.js: Get File Name and Extension from Path/URL
The path module (one of the core modules of Node.js) gives us some methods to simply retrieve the name and extension of a file from a path or web URL: path.basename(path: string, extension?: string): Returns the…
Customize Borders of TextField/TextFormField in Flutter
This short article walks you through a few examples of customizing borders of a TextField (or TextFormField) widget in Flutter. Without any further ado, let’s get started. Example 1: TextField enabledBorder and focusedBorder This sample app…
Flutter TextField: Styling labelText, hintText, and errorText
This short and concise article shows you how to style the label text, hint text, and error text of a TextField (or TextFormField) widget in Flutter. Note: Everything in following examples is the same if you…
How to set width, height, and padding of TextField in Flutter
This article shows you how to set the width, height, and inner padding of a TextField widget in Flutter. Setting the width of a TextField You can set the width of a TextField exactly as you…
Most Popular Packages for State Management in Flutter (2021)
This article lists the most popular packages used for state management in Flutter applications that contain multiple screens. The top 2 criteria for us to include a package on this list are the number of stars…
How to check your Flutter and Dart versions
This short article is about checking Flutter SDK and Dart SDK versions that are installed on your computer. In addition, you’ll also learn how to upgrade your Flutter SDK, find out which Flutter channel is being…
Understanding Typedefs (Type Aliases) in Dart and Flutter
Flutter and Dart have gotten better and more popular recently. Many new features and improvements have been added. In this article, we’ll explore typedefs in Dart (also known as type aliases) and go through a few…