Get Started
SDKs
- Javascript
- iOS
- Android
- ReactNative
- Flutter
- Introducing
- User identity
- Track events
- Track pages
- AI tools
- Forms
- Push notifications
- In-app notifications
- Audio recording
- Console logs
- Custom actions
- Ticket attributes
- Custom data
- Callbacks
- Tags
- Feedback button
- Network logs
- Translations
- Widget control
- Prefill the widget form
- Conversations
- Feature requests
- Help center
- Release notes & news
- Surveys
- Checklists
- FlutterFlow
- Ionic / Capacitor
- Cordova
Flutter
Callbacks
Set callbacks to different actions to get notified on certain state changes of the Gleap widget. This enables you to create an even deeper integration with Gleap.
Copy
Gleap.registerListener(
actionName: 'feedbackFlowStarted',
callbackHandler: (dynamic flow) {
// Do something with the flow
},
);
Copy
Gleap.registerListener(
actionName: 'initialized',
callbackHandler: (_) {
// Do something when Gleap is initialized
},
);
Copy
Gleap.registerListener(
actionName: 'notificationCountUpdated',
callbackHandler: (dynamic count) {
// Do something with the count
},
);
Copy
Gleap.registerListener(
actionName: 'feedbackSent',
callbackHandler: (_) {
// Do something
},
);
Copy
Gleap.registerListener(
actionName: 'feedbackSendingFailed',
callbackHandler: (_) {
// Do something
},
);
Copy
Gleap.registerListener(
actionName: 'widgetOpened',
callbackHandler: (_) {
// Do something
},
);
Copy
Gleap.registerListener(
actionName: 'widgetClosed',
callbackHandler: (_) {
// Do something
},
);
Assistant
Responses are generated using AI and may contain mistakes.