Mobile

Flutter & Dart: ENUM Example

Updated: May 27, 2023 By: Augustus

This article shows you how to use enumerations (also known as enums or enumerated types) in Dart and Flutter. Overview An enumeration in Dart is a set of symbolic names (members) bound to unique, constant values….

Flutter: How to place Text over an Image

Updated: February 11, 2023 By: Augustus

In Flutter, you can place text over an image by using the Stack widget. Example Screenshot The code (without boilerplate) Full source code in main.dart Hope this helps. Further reading: You can also take a tour…

Flutter CupertinoDialog Example

Updated: March 24, 2023 By: Augustus

This article shows you how to show and hide a Cupertino (iOS-style) dialog in Flutter. TL;DR The built-in showCupertinoDialog method of the cupertino library helps us easily implement a CupertinoDialog in a Flutter app. Showing a…

Flutter: Prevent Soft Keyboard from covering TextField

Updated: January 25, 2023 By: Augustus

To prevent the soft keyboard from covering your TextField while the user is typing, you can wrap your main widget with SingleChildScrollView. Example Before using SingleChildScrollView: After using SingleChildScrollView: In case you place some text fields…

Flutter: Sizing a Container inside another Container

Updated: February 11, 2023 By: Augustus

To size a Container that resides inside another Container, you need to set the alignment property of the parent Container to an alignment value. Otherwise, the child Container won’t care about the width and height you…

Flutter: InkWell Examples

Updated: February 11, 2023 By: A Goodman

A few examples of using the InkWell widget in Flutter to create a rectangular area that responds to touch like a button. Example 1: Simple Usage Demo (the ripple effect you see in the GIF below…

Flutter: Passing data between Screens (updated)

Updated: February 11, 2023 By: A Goodman

To pass data from one screen (route, page) to another one in Flutter, you can do like so: To retrieve the passing data, just use the following: For more clarity, please take a look at the…

Flutter: Moving between Screens (beginner guide)

Updated: February 11, 2023 By: A Goodman

In Flutter, a screen (page, route) is a normal widget but it’s loaded such that it fills the entire (or the majority) of the device screen. To navigate from one screen to another, we can use…

Working with Cupertino Date Picker in Flutter

Updated: September 1, 2023 By: A Goodman

There are many times you need to implement a date picker that lets the user select a date and time for some purposes, such as setting an alarm clock, scheduling an event, choosing someone’s date of…

Flutter rounded Card examples

Updated: April 23, 2023 By: A Goodman

The 2 following examples show you how to create rounded-corner cards and circle cards in Flutter by using the Card widget. Rounded Card Screenshot: The code: Circle Card A circle card actually is a specific rounded…

Flutter ClipRRect examples

Updated: March 23, 2023 By: A Goodman

In Flutter, you can use the ClipRRect widget to create rounded corners rectangle widgets, or even circular widgets. Let’s walk through the following examples to get a better understanding. Example 1: Rounded corners Container The code:…

Flutter: Hide the AppBar in landscape mode

Updated: February 6, 2023 By: A Goodman

Sometimes, you may want to hide the AppBar of your Flutter app when the device orientation is landscape (but still show the AppBar in portrait mode) in order to have more free space. To archive so,…

1 37 38 39 40 41 46