⚡️ Custom actions
We know that the built in actions (Bug reporting, Feature requests & Rating) might be not enough for certain use cases. For these situations we offer custom actions.

Configure a custom action

The first step with custom actions is to open the visual widget configurator and select "Custom action" as action type.
Now you need to set your custom action's name. This can be any name you'd like (it's important to check for the same name within the next step).

Custom action callback

Bugbattle allows to register callbacks in order to get notified once a custom action gets triggered. If you use multiple custom actions, we suggest to check the triggered custom action's name in order to find out which custom action got triggered.
1
BugBattle.addCustomActionCallback((call) async {
2
if (call.method == "customActionCalled" && call.arguments['name'] == "MAGIC_ACTION") {
3
// Magic action got triggered.
4
// Perform your custom action here.
5
}
6
});
Copied!
The custom action name gets defined by you within the visual widget configurator.
Last modified 3mo ago