---
title: "Flutter SDK: Custom actions"
description: "Handle custom actions triggered by the widget with the Gleap Flutter SDK. Follow the integration code examples."
url: https://docs.gleap.ai/en/articles/542-flutter-sdk-custom-actions
collection: "Flutter"
updated: 2026-11-01
language: en
---

# Flutter SDK: Custom actions

Handle custom actions triggered by the widget with the Gleap Flutter SDK. Follow the integration code examples.

We know that the built in actions (Bug Reporting, Feature Requests, Ratings & Contact Us) might not be enough for certain use cases. For these situations we offer custom actions, which allow you to start any custom action by code.

## Configure a custom action

Open Settings → Widget → Content → Quick actions. Add or open a quick action, choose Custom action, and enter its Custom action name. Use that exact name in the handler below.

Now you need to **set a name for your custom action**. Choose any name you like (it's however important that this name matches the name you check in the next step).

![Current messenger quick-action settings in the Pied Piper demo project.](https://staticfiles.gleap.io/p613b5dd730aed737108f87ab/gmAdnE7X2jnNhNn1dRmzvgLczFyPAIF7Qsn2PicWuQHx4eAMN1Er2Il0dBP2VBl1brGt4Zn56QT.png)

## Custom action callback

Once you've set a custom action in the Gleap dashboard, it will be called automatically on selection through the user. In order to perform custom code, simply register the action to receive the custom action events.

### Add & implement the Gleap custom action

The following code sample shows how to register a custom action.

```dart
Gleap.registerListener(
    actionName: '{custom-action-name}',
    callbackHandler: (dynamic actionName) {
        // Do something with the actionName
    },
);
```

> **Info:** The **actionName** is defined by you in the visual widget configurator on the Gleap dashboard.

## Related

- [Flutter SDK setup](https://docs.gleap.ai/en/articles/531-flutter-sdk-setup.md)
- [Flutter SDK: User identity](https://docs.gleap.ai/en/articles/532-flutter-sdk-user-identity.md)
- [Flutter SDK: Track events](https://docs.gleap.ai/en/articles/533-flutter-sdk-track-events.md)
- [Flutter SDK: Track pages](https://docs.gleap.ai/en/articles/534-flutter-sdk-track-pages.md)
- [Flutter SDK: Frontend tools](https://docs.gleap.ai/en/articles/535-flutter-sdk-frontend-tools.md)
