# Global Properties

> This page is about FlutterFlow Studio (the visual builder), not FlutterFlow (the app builder you use by describing your app).

URL: https://docs.flutterflow.io/resources/data-representation/global-properties

Learn how to use FlutterFlow Studio global properties to access app, device, and platform information.

Global properties are built-in variables that you can use across all pages of your FlutterFlow Studio app. FlutterFlow Studio defines these properties; you can't create your own or assign values to them.

For example, global properties can be used to redirect users to another page if they are not logged in or to enable specific functionality based on the platform your app is running on.

You can access these properties through **Set from Variable > Global Properties**.

![global-properties.avif](https://docs.flutterflow.io/assets/images/global-properties-334541daf62a438eecee710a65a556db.avif)

## List of Global Properties

The following global properties are available:

- **Is User Logged In:** Indicates whether a user is currently logged into the app. Use this value to show content or features based on login status. This property is only accessible if you have enabled authentication.

- **Current Time:** Returns the current date and time. Use [custom formatting](#current-time) to control how the value is displayed.

- **Current Device Location:** Returns the user's current location. See how to [use the location as a map's initial location](#current-device-location).

- **Link To Current Page:** Provides the [Deep Link](https://docs.flutterflow.io/concepts/navigation/deep-dynamic-linking#deep-link) of the current page.

- **Current Route Path:** Provides the route name of the currently visible page. Use this value to check which page is active before running an action. For example, a push notification might open another page while the home page's **On Page Load** actions are running. See the [example of checking the active route](https://github.com/FlutterFlow/flutterflow-issues/issues/2765#issuecomment-2598915946).
- **Current Route Stack:** Returns the route names in the app's navigation stack. Use this list for custom back navigation, breadcrumbs, or navigation analytics.
- **Fraction of Screen Width:** Returns a specified fraction of the screen width. For example, half the screen width can be used to size a widget to 50% of the available width.
- **Fraction of Screen Height:** Returns a specified fraction of the screen height. For example, half the screen height can be used to size a widget to 50% of the available height.
- **Screen Width:** Returns the screen width in logical pixels, not physical display pixels.
- **Screen Height:** Returns the screen height in logical pixels, not physical display pixels.
- **Is Android:** Determines if the user is accessing the app on an Android device. [Refer here](#is-androidiosweb).
- **Is iOS:** Determines if the user is accessing the app on an iOS device. [Refer here](#is-androidiosweb).
- **Is Web:** Determines if the user is accessing the app through a web browser. [Refer here](#is-androidiosweb).
- **Is Debug Mode:** Indicates if the app is currently running in debug mode, useful for displaying features or performing actions only during debugging.
- **Is Dark Mode:** Checks if the app's current theme mode is set to dark.
- **Is Light Mode:** Checks if the app's current theme mode is set to light.
- **Is On-Screen Keyboard Visible:** Checks whether the on-screen keyboard is visible. Use this value to adjust the layout when the keyboard opens. See the [bottom navigation example](#is-on-screen-keyboard-visible).
- **Current Environment:** Returns the current [development environment](https://docs.flutterflow.io/testing/dev-environments) value.

:::tip[Generated Code]
Learn more about the [**Generated Code**](https://docs.flutterflow.io/generated-code/state-management#global-state) behind Global Properties.
:::

### Current Time

The **Current Time** property returns the current date and time. This option is available when **Source** is set to **Global Properties**.

You can use this property to display the current date and time on the screen or pass it to a FlutterFlow Studio or custom widget for further processing.

#### Custom Formatting

Use **Custom Format** when you need a date or time format that isn't available among the predefined options.

![Current Time with the custom format yyyy/MM/dd || kk:mm displays 2023/07/25 || 10:30.](https://docs.flutterflow.io/assets/images/current-time-light-b3c17217207d94533d06982e82fdff62.png)

For example, the custom pattern `yyyy/MM/dd || kk:mm` displays July 25, 2023, at 10:30 AM as `2023/07/25 || 10:30`. The pattern uses these symbols:

- `yyyy` represents a four-digit year, like `2023`.
- `MM` is a two-digit month, such as `07` for July.
- `dd` indicates a two-digit day, for instance, `25`.
- `kk` represents a two-digit hour from `01` to `24`, with midnight represented as `24`.
- `mm` stands for a two-digit minute, such as `30`.

Use `HH` instead of `kk` for hours from `00` to `23`, with midnight represented as `00`.

The following explicit patterns show common formats. Example output uses July 25, 2023, at 10:30:45 AM in an English locale.

| Custom Pattern | Example Output |
| --- | --- |
| `yyyy/MM/dd` | `2023/07/25` |
| `dd/MM/yyyy` | `25/07/2023` |
| `MMM d, yyyy` | `Jul 25, 2023` |
| `MMMM d, yyyy` | `July 25, 2023` |
| `EEEE, MMMM d, yyyy` | `Tuesday, July 25, 2023` |
| `HH:mm` | `10:30` |
| `HH:mm:ss` | `10:30:45` |
| `h:mm a` | `10:30 AM` |

Explicit patterns control field order and separators. Month and weekday names depend on the locale. DateFormat also supports locale-adaptive skeletons, such as `yMd` and `jm`. A skeleton's output depends on the locale; `jm` can use either 12-hour or 24-hour time.

:::note
For more patterns and information about skeletons, see the [**DateFormat class documentation**](https://pub.dev/documentation/intl/latest/intl/DateFormat-class.html).
:::

### Current Device Location

**Current Device Location** returns the device's location as latitude and longitude. You can access it when **Source** is set to **Global Properties**.

Use this value to display the user's location on a map or store it in a backend database.

:::caution
Use Run mode to test this property; it isn't supported in Test mode. To test on Android, iOS, or desktop platforms, use [**Local Run**](https://docs.flutterflow.io/testing/local-run).
:::

For example, use the device's location as the initial location of a GoogleMap widget, which accepts a `LatLng` value:

1. Select the **GoogleMap** widget in the widget tree or on the canvas.
2. In the properties panel, find **Initial Location** and click **Set from Variable**.
3. Set the **Source** to **Global Properties**.
4. Set **Available Options** to **Current Device Location**.
5. Click **Confirm**.

![Set the GoogleMap widget's Initial Location from Global Properties > Current Device Location to use the device's latitude and longitude.](https://docs.flutterflow.io/assets/images/get-current-device-location-321ce7fc3af2050eda9e77087827bd19.png)

### Is Android/iOS/Web

Use **Is Android**, **Is iOS**, and **Is Web** in visibility conditions or conditional actions to customize behavior for each platform. Each property returns a Boolean value.

- **Is Android:** Show Android-specific instructions or run an action intended for the Android app when this property is `true`.
- **Is iOS:** Show iOS-specific instructions or run an action intended for the iOS app when this property is `true`.
- **Is Web:** Show browser-specific instructions when this property is `true`. A web app can run in a desktop or mobile browser, so this property doesn't indicate the screen size.

### Is On-Screen Keyboard Visible

**Is On-Screen Keyboard Visible** returns `true` when the on-screen keyboard is visible and `false` when it is hidden. You can access it when **Source** is set to **Global Properties**.

#### Hide Bottom Navigation When the Keyboard Is Visible

For example, an app with a dog-details form can hide its custom bottom navigation bar while the user types in a text field.

Here's how it looks:

![The custom bottom navigation is visible when the keyboard is hidden and hidden when a text field opens the keyboard.](https://docs.flutterflow.io/assets/images/keyboard-bottom-navigation-56bbe524413e29e94860e3fcb3e020ac.png)

Add [Conditional Visibility](https://docs.flutterflow.io/resources/ui/widgets/widget-commonalities#conditional) to the custom bottom navigation. Set the condition to show the navigation only when **Global Properties > Is On-Screen Keyboard Visible** is `false`. This keeps the navigation visible when the keyboard is hidden and hides it when the keyboard opens.

![Conditional Visibility shows the bottom navigation when Is On-Screen Keyboard Visible is false and hides it when the property is true.](https://docs.flutterflow.io/assets/images/keyboard-conditional-visibility-0763b94dce33e810121f03d9f3366224.png)
