Flutter Navigator 2.0 for Authentication and Bootstrapping — Part 2: User Interaction

Flutter Navigator 2.0 for Authentication and Bootstrapping — Part 2: User Interaction

Flutter Navigator 2.0 for Authentication and Bootstrapping — Part 2: User Interaction. We had a short introduction to the Navigator 2.0 API and explained the sample apps that we will be building incrementally.

  • Part 1: Introduction
  • Part 2: User Interaction
  • Part 3: Authentication
  • Part 4: Bootstrapping
  • Part 5: Web

In the  first part of this series, we had a short introduction to the Navigator 2.0 API and explained the sample apps that we will be building incrementally. In this article, we will introduce the Router widget and the  Pages API. Then we will explain how to build a navigation stack according to the app state changes. We will focus on the following user interactions causing the app state changes:

  • Selecting a color and shape border type by pressing the buttons in the lists
  • Pressing the back button in the app bar
  • Pressing the system back button (Android only)

Router Widget

There are two ways of using the Router widget within the WidgetsApp :

  1. Using WidgetsApp.router constructor, we pass the Router widget delegates as constructor parameters. Note that, using this method requires passing the delegate that is responsible for route information parsing and restoring. In the first three samples, we won’t be parsing and restoring routes. Therefore, we won’t be using this method until the fourth sample app.
  2. Instantiating the Router widget and passing it as the home property of the WidgetApp. In this case, the RouterDelegate should be non-null. We don’t have to provide other delegates when constructing theRouter widget unless we want to customize their default behaviours.

flutter dart navigator

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Google's Flutter 1.20 stable announced with new features - Navoki

Google has announced new flutter 1.20 stable with many improvements, and features, enabling flutter for Desktop and Web

What is Flutter and why you should learn it?

Flutter is an open-source UI toolkit for mobile developers, so they can use it to build native-looking Android and iOS applications from the same code base for both platforms. Flutter is also working to make Flutter apps for Web, PWA (progressive Web-App) and Desktop platform (Windows,macOS,Linux).

6 Things About HTTP Request in Dart For Beginners

Here is an http request to get a user's data using GET request, First, we have to make an async function that returns a type. If you are here and a beginner, that means you want to learn everything about making an API request using Dart in Flutter, then you are in the right place for the HTTP tutorial.

Adobe XD plugin for Flutter with CodePen Tutorial

Recently Adobe XD releases a new version of the plugin that you can use to export designs directly into flutter widgets or screens.

Dart Isolates - Flutter compute function - Multithreading in Dart and Flutter

I want to talk a little bit more about how Multithreading in Dart and Flutter is possible. Therefore I talk a little bit on how you can create Isolates and how they work internally. Because the boilerplate of the Isolate is heavy I want also to talk about the compute function of Flutter.