Working with Dialog in Flutter

Updated: February 14, 2023 By: Augustus

Summary To show a dialog in Flutter, you can use the built-in showDialog() function and the Dialog widget like this: To close the dialog, just use (the user can also close the dialog by tapping somewhere…

5 Ways to Create Rounded Buttons in Flutter

Updated: February 15, 2023 By: Augustus

Today, rounding the sharp edges of rectangular objects is a popular trend in design. You can see this everywhere, from cell phones to laptops, from TVs to car monitors. Websites and mobile applications are also in…

Flutter: Get Device Screen Width and Height

Updated: February 14, 2023 By: Augustus

Knowing the screen width and height can be useful in several scenarios while developing mobile apps. Some of the common use cases include: In Flutter, you can get the device screen width by using: To get…

Using the Banner widget in Flutter – Tutorial & Examples

Updated: February 14, 2023 By: Augustus

In Flutter, the Banner widget is used to display a little slanted message at one corner of another widget. This is useful in many situations, such as when you want to assign a discount label to…

Flutter: ListTile examples (updated)

Updated: August 5, 2023 By: Augustus

A few examples of the ListTile widgets in Flutter. Example 1 (Simple) This example displays a card with a list tile inside. The list tile contains a leading icon, a title, a subtitle, and a trailing…

Flutter & Dart: Check if a date is between 2 other dates

Updated: January 8, 2023 By: Augustus

To check if a date is between 2 other ones in Flutter and Dart, you can use the isBefore() and isAfter() methods of the DateTime class. Example Output: You can find more information about the DateTime…

Flutter Cupertino ActionSheet: Tutorial & Example

Updated: March 24, 2023 By: Augustus

This article is about the CupertinoActionSheet widget in Flutter. Overview The CupertinoActionSheet widget is used to create an iOS-style action sheet. An action sheet presents multiple choices related to an intentional user action. On small screens,…

Flutter: Container with Gradient Background

Updated: October 3, 2022 By: A Goodman

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:…

Flutter: “I agree to terms” checkbox example

Updated: January 30, 2023 By: Augustus

In this example, we’ll create a simple Flutter app that has a checkbox and a button. By default, the checkbox is unchecked, and the button is disabled. When the checkbox is checked, the button is clickable….

Flutter: GridView examples

Updated: February 6, 2023 By: Augustus

Below are a few examples of using GridView, a common widget that is used to display a scrollable grid of child widgets, in Flutter. Example 1: Static Content This example displays a grid view that contains…

Flutter: Showing SnackBar with ScaffoldMessenger

Updated: February 15, 2023 By: A Goodman

This article shows you how to use ScaffoldMessenger to display SnackBars in Flutter applications. Overivew ScaffoldMessenger provides APIs for displaying snack bars in a neat and simple way. With the ScaffoldMessenger class, we can now call…

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….

1 31 32 33 34 35 38