-
Notifications
You must be signed in to change notification settings - Fork 110
Pinkesh/navigation #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6cfe1f8
added navigation overview
pinkeshmars f805f8a
passing data section added
pinkeshmars c9c73fc
Added TabBar widget
pinkeshmars 86bec44
Merge branch 'main' of https://github.com/FlutterFlow/flutterflow-doc…
pinkeshmars 6c99ca1
Added pageview widget
pinkeshmars eb3d1c7
Added webview widget
pinkeshmars c191767
Added launch url action
pinkeshmars 0938f99
Nit fixes
PoojaB26 379bbba
Merge branch 'main' of https://github.com/FlutterFlow/flutterflow-doc…
pinkeshmars 4499b7b
Addressed review comments
pinkeshmars f6219f9
Sidebar fix: change 'I' to 'i' in integration folder in this branch
pinkeshmars 8ac81dc
Address review comments
pinkeshmars File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.14 MB
docs/ff-concepts/navigation-routing/imgs/adding-parameter-details-page.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+104 KB
docs/ff-concepts/navigation-routing/imgs/build-listview-details-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+105 KB
docs/ff-concepts/navigation-routing/imgs/doc-reference-todo-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+82.9 KB
docs/ff-concepts/navigation-routing/imgs/doc-referenence-todo-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
slug: launch-url | ||
title: Launch URL [Action] | ||
tags: [] | ||
description: Learn how to use the Launch URL Action in FlutterFlow to open URLs with supporting apps. | ||
sidebar_position: 7 | ||
--- | ||
|
||
The Launch URL Action lets you specify a URL that will be opened using an app supporting it. If there is more than one app that can handle the specified URL, the user will be presented with a dialog from where one of the apps can be selected. | ||
|
||
## Adding Launch URL Action | ||
|
||
Follow the steps below to add this action to any widget. | ||
|
||
1. Select the **Widget** (e.g., Container, Button, etc.) on which you want to add the action. | ||
2. Select **Actions** from the Properties panel (the right menu), and click **Open**. This will open an **Action Flow Editor** in a new popup window. | ||
3. Click on the **+ Add Action**. | ||
4. On the right side, search and select the **Launch URL** (under widget/UI Interactions) action. | ||
5. In the *URL Value Type* property, select either **Specify URL** (to add the URL as a String) or **From Variable** (to use the value stored in a String variable). | ||
6. If using **Specify URL**, enter the URL that you want to use in the **URL** field. For example, you can enter "[https://flutter.dev](https://flutter.dev/)" to open the Flutter webpage. | ||
7. If using **From Variable**, select the **Source** from which to fetch the URL value. You can also specify a **Default Value** that will be used when the variable value is not set (i.e. null). | ||
|
||
 | ||
|
||
--- | ||
|
||
## URL schemes | ||
A URL scheme is a way to define how different types of links, such as webpages, phone numbers, SMS messages, and emails, should be handled by an app or browser. The following are some common URL schemes that can be handled by an external app present on the user's device. | ||
|
||
### Open a webpage | ||
|
||
This URL scheme for loading up a webpage can be defined in this format: | ||
|
||
#### Scheme | ||
|
||
`http:<webpage URL link>` | ||
|
||
`https:<webpage URL link>` | ||
|
||
#### Example | ||
|
||
`https://flutter.dev` | ||
|
||
 | ||
|
||
### Use a phone number | ||
|
||
This URL scheme helps to handle phone numbers inside your app. Using this, you can easily initiate a phone call to the provided phone number from the user's device. | ||
|
||
#### Scheme | ||
|
||
`tel:<phone-number>` | ||
|
||
#### Example | ||
|
||
`tel:2125551212` | ||
|
||
 | ||
|
||
### Compose a text message | ||
|
||
This URL scheme lets you redirect users from your app to compose and send an SMS message to a specified phone number. | ||
|
||
#### Scheme | ||
|
||
`sms:<phone_number>` | ||
|
||
#### Example | ||
|
||
`sms:2125551212` | ||
|
||
 | ||
|
||
### Create an email | ||
|
||
This URL scheme helps you to launch an email app on the user's device. It allows you to pass the *email to*, *subject*, and *body* to the app so that you have these fields prefilled with details as the email app is opened. | ||
|
||
#### Scheme | ||
|
||
`mailto:<email_address>?subject=<subject>&body=<body>` | ||
|
||
#### Example | ||
|
||
`mailto:name@example.org?subject=Welcome%20to%20FlutterFlow&body=Hey%20there` | ||
|
||
This will pass the following details to the email app: | ||
|
||
***mailto:*** name@example.org, ***subject:*** Welcome to FlutterFlow, ***body:*** Hey there | ||
|
||
 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
--- | ||
slug: overview | ||
title: Overview | ||
tags: [] | ||
description: Learn how to add navigation in FlutterFlow. | ||
sidebar_position: 0 | ||
--- | ||
|
||
# Overview | ||
|
||
Navigation in FlutterFlow is a crucial aspect of app development, enabling users to move between different pages or screens. This is achieved through a system of routing, where each page is assigned a unique route identifier. Understanding how navigation works and what happens to the navigation stack under the hood can help you create a seamless user experience. | ||
|
||
## What are Routes? | ||
Routes are essentially the paths that define different screens or pages within the app. Each route is associated with a specific screen and has a unique identifier that allows the app to recognize and navigate to it. For example, a route could point to the home screen, a product details page, or a user profile page. | ||
|
||
| Page | Route | | ||
|------------------|------------------| | ||
| Home | /home | | ||
| Product Details | /product-details | | ||
| Cart | /cart | | ||
|
||
|
||
## Navigation Stack Logic | ||
|
||
The **navigation stack** is a data structure that keeps track of the routes as they are pushed and popped off the stack. It follows the Last In, First Out (LIFO) principle, meaning the last screen that was navigated to is the first one to be navigated away from when the user presses the back button. | ||
|
||
Here’s how the navigation stack logic works in FlutterFlow: | ||
|
||
### 1. Pushing a Route | ||
When you navigate to a new screen, that route is pushed onto the top of the stack. | ||
|
||
For example, if you are on the home screen and navigate to the profile screen, the profile screen route is pushed onto the stack. | ||
|
||
 | ||
|
||
### 2. Popping a Route | ||
When you navigate back, the topmost route is popped off the stack, and the previous screen becomes visible. | ||
|
||
For example, if you are on the profile screen and press the back button, the profile screen route is popped off, revealing the home screen. | ||
|
||
 | ||
|
||
### 3. Replacing a Route | ||
Sometimes, you might want to replace the current route with a new one without adding to the stack. This is useful for actions like logging in, where you don’t want users to navigate back to the login screen after they have logged in. | ||
|
||
For example, after a successful login, replace the login screen route with the home screen route. | ||
|
||
 | ||
PoojaB26 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
## Navigation Actions | ||
|
||
In FlutterFlow, there are three main navigation actions you can use to navigate between different screens in your app. Here are they: | ||
|
||
1. [Navigate To (Push a Route)](#1-navigate-to-push-a-route) | ||
2. [Navigate Back (Pop a Route)](#2-navigate-back-pop-a-route) | ||
3. [Replace Route](#3-replace-route) | ||
|
||
### 1. Navigate To (Push a Route) | ||
|
||
This action involves navigating to a new screen by pushing a new route onto the navigation stack. | ||
|
||
**What Happens Under the Hood:** | ||
|
||
- When you push a route, a new screen is placed on top of the current stack. This means the current screen is still in the stack but is not visible to the user. | ||
- The new screen becomes the active screen that the user interacts with. | ||
|
||
:::info | ||
|
||
Learn more about adding this action [**here**](../../resources/ui-building-blocks/pages/navigation#navigate-to-action). | ||
|
||
::: | ||
|
||
### 2. Navigate Back (Pop a Route) | ||
|
||
This action involves navigating back to the previous screen by popping the current route off the navigation stack. | ||
|
||
**What Happens Under the Hood:** | ||
|
||
- When you pop a route, the current screen is removed from the stack, and the previous screen becomes active again. | ||
- This action effectively reverses the last push operation. | ||
|
||
:::info | ||
|
||
Learn more about adding this action [**here**](../../resources/ui-building-blocks/pages/navigation#navigate-back-action). | ||
|
||
::: | ||
|
||
### 3. Replace Route | ||
|
||
This action involves replacing the current route with a new route. Unlike pushing a route, replacing a route does not add to the stack but swaps the current route with the new one. | ||
|
||
**What Happens Under the Hood:** | ||
|
||
- The current screen is removed from the stack, and the new screen is added in its place. | ||
|
||
:::info | ||
|
||
- This is useful when you want to prevent the user from navigating back to the previous screen. | ||
- This action is essentially the **Navigate To** action with the **Replace Route** option enabled. Learn more about adding this action [**here**](../../resources/ui-building-blocks/pages/navigation#navigate-to-action). | ||
|
||
::: |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One liner explanation of what
scheme
is should complete this section.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add in the top before this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!