Mobile

Flutter FractionallySizedBox example

Updated: February 6, 2023 By: Augustus

This article gives you a practical Flutter example of implementing FractionallySizedBox, a widget that sizes its child to a fraction of the total available space. Here’s its constructor: Example This sample app contains a yellow box…

Flutter & Dart: every() method examples

Updated: February 6, 2023 By: Augustus

A few examples of using the every() method (of the Iterable class) in Dart (and Flutter as well). The purpose of this method is to check if every element of a given iterable satisfies one or…

Flutter & Dart: reduce() examples

Updated: February 6, 2023 By: Augustus

In Dart, the reduce() method (of the Iterable class), as its name describes itself, executes a “reducer” callback function (provided by you) on each element of the collection, in order, passing in the return value from…

Working with For loop in Dart (and Flutter)

Updated: February 6, 2023 By: Napoleon

The for loop is one of the most important features in many programming languages including Dart. 1. For-in syntax Example: Output: 2. A different syntax of the “for” loop in Dart Example: Output: Further reading: You…

Working with OutlinedButton in Flutter

Updated: March 6, 2024 By: A Goodman

An OutlinedButton in Flutter is a labeled child displayed on a (zero elevation) Material widget that can react to touches by filling with a background color. OutlinedButton is the replacement for OutlineButton, which is now depreciated…

Working with TextButton in Flutter

Updated: March 6, 2024 By: A Goodman

Buttons are an essential component of every Flutter mobile and web application. In this article, we are going to take a look at the TextButton widget. You will learn how to implement text buttons and how…

Simultaneously run Flutter on Android and iOS simulators

Updated: February 4, 2023 By: A Goodman

You can run your Flutter project on an Android emulator and an iOS simulator at the same time by running this: Note that you must start your Android emulator and iOS simulator before executing the command…

Limit resources consumed by Docker Desktop

Updated: February 23, 2022 By: Napoleon

Done. Further reading: How to reset Docker Desktop How to Install Docker Compose on Ubuntu 21.04 and 21.10 Start, Pause, Restart, Stop, and Delete a Docker Container Docker: How to Name or Rename a Container Docker:…

Working with ElevatedButton in Flutter

Updated: March 6, 2024 By: A Goodman

Most mobile and web applications have buttons that allow users to press to interact. In Flutter, you can use the ElevatedButton widget to create elevated buttons. ElevatedButton is the replacement for RaisedButton, which is now obsolete…

Flutter: Vertically center a widget inside a Container

Updated: April 23, 2023 By: A Goodman

This article walks you through 4 techniques to vertically center a child widget inside a Container in Flutter. Using the alignment property Set the alignment property to Alignment.center, Alignment.centerRight, or Alignment.centerLeft. Example Output: Using a Center…

How to embed Youtube video in Flutter

Updated: February 6, 2023 By: A Goodman

This straightforward, concise tutorial shows you how to embed a Youtube video into a Flutter mobile app. We’ll use youtube_player_flutter, one of the most popular packages for this stuff. Setting up the plugin Add this to…

Flutter iOS: Trying to embed a platform view but…

Updated: February 6, 2023 By: A Goodman

Problem When developing a Flutter app for iOS and using some packages to embed Youtube videos, Google Maps, or something similar to these ones, you may see the following error message: Or: Solution To get rid…

1 40 41 42 43 44 46