# Utility Actions

> 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/functions/utility-actions

Learn how to use utility actions to select colors and dates, verify identity, copy text, change themes, and open communication apps.

Utility actions let you select colors and dates, request biometric verification, copy text, change the app theme, and open email, phone, or messaging apps.

## Add a Utility Action

To add any action described on this page:

1. Select the widget that triggers the action, such as a Button.
2. Open the **Actions** tab in the properties panel and choose an event, such as **On Tap**.
3. Open the **Action Flow Editor**. For the first action, select **+ Add Action**. To add an action to an existing flow, select **+**, then **Add Action**.
4. Search for the action by name and select it.

The following sections describe how to configure each action.

## Color Picker [Action]

The **Color Picker** action lets users choose a color from a palette or enter a HEX or RGB value. For example, users can choose a product color.

![Color picker with color, hue, and opacity controls.](https://docs.flutterflow.io/assets/images/utility-color-picker-0196d181c2634cf1729300ac657ab3de.png)

Add **Color Picker**, then configure these options:

- **Initially Selected Color**: Set the color selected when the picker opens.
- **Text Color**: Set the primary text color in the picker.
- **Secondary Text Color**: Set the color of secondary text in the picker.
- **Background Color**: Set the picker's background color.
- **Primary Button Background Color**: Set the primary button's background color.
- **Primary Button Text Color**: Set the primary button's text color.
- **Primary Button Border Color**: Set the primary button's border color.
- **Allow Opacity**: Turn this off to allow only opaque colors.
- **Show Recent Colors**: Turn this off to hide recently used colors.

After the user selects a color, access it through **Widget State > Color Picked**. Use it in a widget's color property or in a subsequent action to update an app state variable or a backend record.

## DateTime Picker [Action]

The **Date/Time Picker** action lets users select a date, a time, or both. Use it for appointment times, reminders, or travel dates.

![Date picker showing a calendar for selecting a date.](https://docs.flutterflow.io/assets/images/utility-date-picker-dd3c234d87b4124a51f688d852298128.png)

### Picker Types {#types-datetime-picker}
Choose the picker type that matches the value you need:

- **Date**: Select a date.
- **Date+Time**: Select a date, then a time.
- **Time**: Select a time.

### Configure the Picker

1. Add **Date/Time Picker** and set **Date/Time Picker Type** to a [picker type](#types-datetime-picker).
2. Set **Default Date/Time** to choose the initial value.
3. To limit selectable dates, set **Minimum Date/Time** and **Maximum Date/Time**.
4. For the **Date** picker, use **Allow Past Date** and **Allow Future Date** to control whether users can select past or future dates. Explicit minimum or maximum values disable the corresponding option.
5. Use **Dismissible** to control whether users can dismiss the picker by tapping outside it.

After the user confirms a selection, access it through **Widget State > Date Picked**. For example, use the value in a Text widget or save it in a subsequent action.

### Customize the Picker

Turn on **Use Cupertino-style** for an iOS-style picker.

For Material-style **Date** and **Date+Time** pickers, set **Date Entry Mode**:

- **Calendar** (default): Select a date from a calendar, with a pencil icon to switch to text input.
- **Calendar Only**: Select a date from a calendar without a text input option.
- **Text Input**: Type a date, with a calendar icon to switch to the calendar.
- **Text Input Only**: Type a date without a calendar option.

**Date Entry Mode** is read-only when **Use Cupertino-style** is on and isn't available for the **Time** picker. For **Date+Time**, it applies only to the date step.

To customize the appearance, turn off **Use Default Theme**. Expand **Header Properties** and **Date/Time Picker Properties** to configure the header and picker styling.

You can also configure these appearance settings:

- **Selected Date/Time Background Color**: Set the background color used to highlight the selected date or time.
- **Selected Date/Time Foreground Color**: Set the text color used for the selected date or time.
- **Action Button Foreground Color**: Set the text color of the picker's action buttons.
- **Icon Size**: Set the size of icons in the picker.

## Biometric Verification [Action]

The **Biometric Verification** action requests on-device authentication, such as fingerprint or facial recognition. Use the result to decide whether to access sensitive content or perform a protected action.

Adding this action doesn't automatically restrict access to your app. Configure the actions that follow it to handle successful and unsuccessful verification.

### Configure Verification

1. Add **Biometric Verification**.
2. To require biometric authentication rather than allowing device credentials, turn on **Allow biometric only**. Otherwise, the device can offer a supported credential, such as a PIN, pattern, or passcode.
3. Enter the **Biometric Reason text** to explain why verification is required.
4. Set an **Action Output Variable Name** to access the verification result in subsequent actions.

### Use the Result

1. Add a conditional action after **Biometric Verification**.
2. Set the condition to the verification result from **Action Outputs**, using the output variable name you configured.
3. In the **TRUE** branch, add the action that requires successful verification, such as opening a page.
4. In the **FALSE** branch, keep the protected action unavailable. You can [**show a snackbar**](https://docs.flutterflow.io/resources/ui/pages/scaffold#snackbar) explaining that verification was unsuccessful.

## Copy to Clipboard [Action]

The **Copy to Clipboard** action copies text, such as a message or transaction ID, so users can paste it into another app.

1. Add **Copy to Clipboard**.
2. Set the text to copy. For dynamic content, select the variable that contains the text.

Test the action by triggering it and pasting the result into a text field.

## Debug Log [Action]

The **Debug Log** action logs a message and values at a specific point in an action flow. Use it to check whether an action runs and inspect the values available at that point.

1. Add **Debug Log** where you want to inspect the flow.
2. Set **Log Level** to the level for the entry, such as **Debug**.
3. Under **Message**, set **Value** to the message to log, such as `Checking selected date`.
4. To include a value, select **Add Value**. Under **Value**, select the variable or value to inspect. Use **Label (optional)** to give it a descriptive name, such as `selectedDate`.
5. Repeat **Add Value** for any additional values you want to inspect.
6. Turn on **Log in Release Builds** if you also need these logs in release builds. Leave it off when the logs are only needed during development.

For example, add **Debug Log** after **Date/Time Picker**, set the message to `Checking selected date`, and add **Widget State > Date Picked** as a value with the label `selectedDate`.

For instructions on viewing logs while testing in a browser, see [**Opening debug logs**](https://docs.flutterflow.io/troubleshooting#opening-debug-logs).

:::tip
Avoid logging passwords, access tokens, or other sensitive data, especially when **Log in Release Builds** is on.
:::

## Set Dark Mode Setting [Action]

The **Set Dark Mode Setting** action changes the app's theme mode.

### Theme Mode Options {#types-of-dark-mode-setting}
Choose one of these settings:

- **From System**: Follow the device's light or dark mode preference.
- **Light Mode**: Use the light theme.
- **Dark Mode**: Use the dark theme.

To configure the action:

1. Add **Set Dark Mode Setting**.
2. Choose **From System**, **Light Mode**, or **Dark Mode** as the theme setting.

For example, add this action to a theme-selection control so users can choose their preferred mode.

## Send Email [Action]

The **Send Email** action opens an email app with a prefilled recipient, subject, and message. The user must send the email; the action doesn't send it automatically.

1. Add **Send Email**.
2. Set **Email Address** to the recipient's email address.
3. Enter the **Subject** and **Body**.

## Call Number [Action]

The **Call Number** action opens the phone dialer with a prefilled number. The user must start the call; the action doesn't place it automatically.

1. Add **Call Number**.
2. Set **Phone Number** to the number to dial.

## Send SMS [Action]

The **Send SMS** action opens a messaging app with a prefilled phone number and message. The user must send the message; the action doesn't send it automatically.

1. Add **Send SMS**.
2. Set **Phone Number** to the recipient's number.
3. Enter the message in **SMS Body**.
