Mobile

Flutter: Set an image background for a Container

Updated: February 15, 2023 By: Napoleon

To set an image background for a Container widget in Flutter, we set its decoration property like this: You can use either NetworkImage or AssetImage. If you have the plan to use AssetImage, you need to…

How to implement SimpleDialog in Flutter

Updated: February 15, 2023 By: Napoleon

Summary This is a short and straight-to-the-point guide to the SimpleDialog widget (that renders a basic material dialog with some options) in Flutter. In general, the SimpleDialog widget isn’t often used directly. Instead, it’s shown by…

How to slow down internet speed on Android Emulator

Updated: March 15, 2022 By: A Goodman

This article shows you how to slow down the internet speed on an Android emulator to fit your testing purposes. 1. Launch your Android emulator then click the three-dot symbol on the toolbar: 2. Select “Cellular”…

Flutter image loading builder example

Updated: January 30, 2023 By: Augustus

This article shows you how to use the loadingBuilder property when working with Image.network() in Flutter. Overview When an image takes too much time to load (caused by a bad internet connection, big file size, etc.),…

How to Handle Network Image Loading Error in Flutter

Updated: October 3, 2022 By: A Goodman

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…

Flutter: Call a void function from another file

Updated: February 15, 2023 By: Augustus

To call a void function from another file in Flutter, there are 2 points you need to know: Example Create a file called test.dart in the lib folder in your Flutter project: Call the doSomething function…

Working with AlertDialog in Flutter

Updated: February 15, 2023 By: Augustus

AlertDialog is a built-in widget in Flutter that has an optional title, optional content, and an optional list of actions. In general, the AlertDialog widget is used with the showDialog() function (a built-in function of Flutter)…

Flutter: Using same-name classes imported from different files

Updated: February 15, 2023 By: Augustus

To use same-name classes, widgets, or functions imported from different files in a Flutter project without changing their names, you can use the as keyword with a prefix (the name of the prefix is up to…

React Native: How to make rounded corners TextInput

Updated: February 22, 2022 By: A Goodman

The example below shows you how to make a rounded corners text input in React Native for both Android and iOS. Screenshot: The code 1. Add a TextInput component: 2. Style it: The complete code: That’s…

Working with dynamic Checkboxes in Flutter

Updated: October 11, 2022 By: A Goodman

When developing real-world applications, you often have to work with dynamic data retrieved from servers or databases. There will be cases where you need to deal with a list where each item in the list will…

Flutter: GridView.builder() Example

Updated: September 1, 2023 By: Augustus

If your Flutter app needs to display a grid view of a large or infinite number of items (a list of products fetched from API, for instance) then you should use GridView.builder() instead of GridView(). The…

How to make Comments in Flutter & Dart

Updated: March 31, 2023 By: Augustus

This is a concise article about commenting in Flutter and Dart. Single-Line Comment (Format Comment) Just put two slash symbols at the beginning of the line you want to comment out. Multi-Line Comment (Block Comment) Syntax:…

1 34 35 36 37 38 46