Flutter: PopupMenuButton example
This succinct, practical article is about the PopupMenuButton widget in Flutter. Quick Overview By default, the PopupMenuButton widget creates a three-dot icon. When the user taps this icon, a menu with one or multiple items will…
Flutter: Showing a badge on the Top Right of a widget
This article shows you a couple of different ways to display a badge on the top right (or any position you like) of a widget in Flutter. The first way is to write your own code,…
How to get the Current Route Name in Flutter
Overview If you register the routes in your Flutter app like this: Then you can retrieve the route name of the current page that is being seen by using this: Notes: If you get confused, see…
5 Ways To Create Circle Icon Buttons in Flutter
There are many ways to create the circle icon button in Flutter. Each of the examples below will use a different method. Example 1: Using ElevatedButton + Icon (recommended) The code: Output: Example 2: Using MaterialButton…
Flutter Bottom Sheet: Tutorial & Examples
BottomSheet is a built-in widget in Flutter. This widget is very useful in many situations, such as when you want to present some information, display a menu, show a form with text fields, etc. This article…
Flutter: Drawer Navigation example
This article shows you how to implement a simple Drawer navigation menu in Flutter. Example Preview We’ll build a small Flutter app that contains 3 screens (HomeScreen, SettingsScreen, and ContactScreen) and a Drawer Navigation. This Drawer…
Flutter: CupertinoPicker Example
In Flutter, CupertinoPicker is an iOS-style widget that displays its children’s widgets on a wheel for selection. To show the CupertinoPicker, we can use the showCupertinoModalPopup or showCupertinoDialog function. Sample code: You can see how this…
How to make Line Charts in Flutter
There’re several plugins that can make our lives much easier when working with line charts in Flutter. In this tutorial, we’ll use fl_chart, one of the most-used chart plugins these days. Installation The new way to…
Flutter: BottomNavigationBar example
In general, a bottom navigation bar displays two to five tabs at the bottom of a screen of a mobile or web app. Each tab contains an icon and an optional text label. In Flutter, you…
Flutter: Using widget.Variable before the build method
In Flutter, you can access variables from the stateful widget class with the widget keyword like this: But in some cases, you may need to get the variables from the stateful widget before Widget build(BuildContext context)…
Flutter: Display Text over Image without using Stack widget
In Flutter, we can use the GridTile widget to display text over an image. This method is easier to implement but less customizable than using the Stack widget. See also: Flutter: How to place Text over…
Flutter: Cupertino ContextMenu example
This article walks you through a complete example of implementing a Cupertino context menu (iOS-style context menu) in Flutter. Example App Preview In this example, we’ll create a sample Fluter app that displays an image from…