Skip to main content

🎨 Custom Actions

Fluttium supports custom actions that you can install to be used in your user flows.

Actions are defined as Dart packages, which can be published to and have their own dependencies.

You can add custom actions by adding them to the actions section in your fluttium.yaml:

log_action: 0.1.0+1

Fluttium will automatically install this action from when testing.

You can also add actions from Git or from your local filesystem:

# From GIT:
path: actions/log_action
# Or from path:
path: ../path/to/log_action

Creating a new action

We can use the new action command to generate a custom action.

fluttium new action <action-name>

Once we run fluttium new create my_action, we should see a my_action directory whose structure should look something like:

├── lib/
│ ├── src/
│ │ └── my_action.dart
│ └── my_action.dart
├── test/
│ ├── src/
│ │ └── my_action_test.dart
│ └── register_test.dart
├── .gitignore
├── analysis_options.yaml
├── pubspec.yaml

You can also pass extra options to the command to control the output, for the full overview of options run:

fluttium new action --help

Finding published actions

You can find actions for Fluttium that have been published by using the dependency search from