Flutter: GridTile examples
Updated: Oct 04, 2022
This article walks you through a few examples of using the GridTile widget in Flutter applications. Overview GridTile helps us quickly and easily create a tile with rich content (a combination of text, images, and icons). This......
Flutter SafeArea example
Updated: Oct 04, 2022
In simple words, SafeArea is a widget that automatically adds padding needed to prevent its descendants from being covered by notches, the system status bar, rounded corners… or other similar creative physical features on the device......
Using GetX (Get) for State Management in Flutter
Updated: Oct 04, 2022
This article shows you how to use GetX (also known as Get) to manage states in Flutter. We are going to build a simple app that displays a list of given products (you can fetch these things from an API or a database as well). A user......
Flutter: Container with Gradient Background
Updated: Oct 03, 2022
In Flutter, you can add a gradient background to a Container by using the gradient property of the BoxDecoration class. Below are a few examples of doing so in practice. Example 1: LinearGradient Background The code: Scaffold( ......
Using GetX (Get) for Navigation and Routing in Flutter
Updated: Oct 03, 2022
Introduction Flutter already provides built-in navigator APIs that can help us navigate between screens (routes) and show dialogs, snack bars, and bottom sheets without installing a third-party library. They are good and easy to......
How to Handle Network Image Loading Error in Flutter
Updated: Oct 03, 2022
This article shows you how to handle error network images in Flutter. If you use Image.network() to display an online image and that image is broken (404 not found, 403 forbidden, etc.), you can use the errorBuilder property to......
TypeORM: How to Select Random Rows
Updated: Sep 27, 2022
In TypeORM, you can select a single or multiple random rows by adding orderBy(‘RANDOM()’) to your query builder. Let’s see a couple of examples below for more clarity. Let’s say we have a User entity like......
TypeORM: Find Records by Relation Columns
Updated: Sep 27, 2022
In TypeORM, you can select rows in a table based on the relation columns (in the related table) by using a query builder like this: const postRepository = myDataSource.getRepository(Post); const posts = await postRepository ......
Using GetX to make GET/POST requests in Flutter
Updated: Sep 27, 2022
GetX is a massively functional and open-source Flutter library that is the most popular these days, with over 10,000 likes on pub.dev. Although GetX provides a wide range of features, each feature is contained in a separate container,......
TypeORM: ORDER BY Multiple Columns
Updated: Sep 22, 2022
In TypeORM, you can order your results by multiple columns. The 2 examples below show you how to do that. The first example uses the find() method whilst the second one uses a query builder. In both of these examples, we will work with......
TypeORM: How to Connect to Multiple Database
Updated: Sep 21, 2022
In TypeORM, you can simply connect to multiple databases simultaneously just by creating multiple data sources. The Steps 1. Setup your data sources: xport const dataSourceOne = new DataSource({ database:......
TypeORM: How to Execute Raw SQL Queries
Updated: Sep 20, 2022
In TypeORM, you can execute raw SQL queries by calling the query() method (you can access this method via your data source or the entity manager). You can do everything from CRUD data (create, read, update, and delete) to other complex......