FlutterFlow Docs
Search
⌃K

Is Android/iOS/Web

These properties are used to know if the user uses the app on Android, iOS, or the Web. You can access these when the Source is set to Global Properties.
While building the app, you might need to know the platform to provide certain functionality only on a specific platform. For example, some custom widgets/actions might only work on Android. These properties help you build such a requirement.

How to use

There can be many use cases for using these properties but for the demonstration purpose, we will build a couple of use cases to show you how to use them.

Allow saving/calling a contact only on Android/iOS

If you are building a feature that only works on a mobile platform (Android/iOS) and does not work on the Web, saving or calling a contact is not possible with the Web app. You can use any of these properties to allow users to make calls only when they are on a mobile platform.
Allowing saving/calling a contact only on Android/iOS

Using a global property with Conditional Action

On Tap of a button (button such as call, save), you can add the conditional action with Is Web property as a condition. Based on whether the user is on the Web, you can add two different actions.
Here are the step-by-step instructions:
  • Select the Widget (e.g. Button) on which you want to define the action.
  • Select Actions from the Properties panel (the right menu), and click Open. This will open an Action flow Editor in a new popup window.
    • Click on the + Add Conditional Action.
    • On the right side (Set Condition for Action), set the Source to Global Properties.
    • Set the Available Options to Is Web.
    • On the left, below the TRUE label, click on the + button and Add Action that will be executed if the user is on Web. This can be showing the snackbar to inform users that the call is not supported.
    • Now, on the right, below the FALSE label, click on the + button and Add Action that will be executed if the user is not on the Web. This can show the snackbar to inform users that the call is in progress.
Using a global property with Conditional Action

Show call button only if a user on Android/iOS

Instead of showing the call button and then deciding whether to allow users to make calls, you can hide the call button if a user is on the Web. Let's see how to use Is Web property to build something like this:
Showing call button only if a user on Android/iOS

Using a global property with Conditional Visibility

You can use the Is Web property while adding conditional visibility on a widget and apply the opposite statement. This will hide the widget if the user is on the Web.
Here are the step-by-step instructions:
  • Select the widget from the widget tree or canvas area.
  • Move to the properties panel, turn on the Conditional Visibility, and click on the Unset. This will open a new panel.
  • Set the Source to Global Properties.
  • Set the Available Options to Is Web.
  • Turn on the Apply Opposite Statement.
  • Click Confirm.
Using a global property with Conditional Visibility