*[<Null safety>](https://dart.dev/null-safety)*
An Intent is a fundamental building block of module development. Modules will either be started with an intent or will receive an intent after they have been launched. It is up to the module author to decide how to respond to the intents that they receive.
A module will only receive intents which have been registered in their module manifest file. A special case is when they are launched by the system launcher in which case the action will be an empty string.
An example manifest which handles multiple intents would look like:
{
"@version": 2,
"binary": "my_binary",
"suggestion_headline": "My Suggesting Headline",
"intent_filters": [
{
"action": "com.my-pets-app.show_cats",
"parameters": [
{
"name": "cat",
"type": "cat-type"
}
]
},
{
"action": "com.my-pets-app.show_dogs",
"parameters": [
{
"name": "dog",
"type": "dog-type"
},
{
"name": "owner",
"type": "person-type"
}
]
}
]
}
Constructors
Intent ({required String? action, String? handler})
Creates an Intent that is used to start a module which can handle the specified action. If an explicit handler is not set the modular framework will search for an appropriate handler for the given action.
Properties
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
Methods
noSuchMethod(Invocation invocation) dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
Operators
operator ==(Object other) bool
The equality operator.
inherited