app_intents 0.5.0 copy "app_intents: ^0.5.0" to clipboard
app_intents: ^0.5.0 copied to clipboard

Flutter plugin for iOS App Intents and Android AppFunctions integration. Enables Siri, Shortcuts, Spotlight, and AI agent support.

app_intents #

pub package License: MIT

Flutter plugin for iOS App Intents and Android AppFunctions integration. Enables Siri, Shortcuts, Spotlight, and AI agent (Gemini) support for your Flutter app.

Features #

  • Register intent handlers to respond to Siri, Shortcuts, and AI agent actions
  • Define entity queries for parameter pickers in Shortcuts
  • Stream-based intent execution events
  • Cross-platform: iOS App Intents + Android AppFunctions
  • Seamless integration with app_intents_annotations and app_intents_codegen

Requirements #

  • iOS: 17.0+
  • Android: API 36+ (Android 16, for AppFunctions)
  • Flutter: 3.3+

Installation #

Add app_intents to your pubspec.yaml:

dependencies:
  app_intents: ^0.5.0
  app_intents_annotations: ^0.5.0

dev_dependencies:
  app_intents_codegen: ^0.5.0
  build_runner: ^2.4.0

Usage #

Basic Setup #

import 'package:app_intents/app_intents.dart';

final appIntents = AppIntents();

// Register an intent handler
appIntents.registerIntentHandler(
  'com.example.AddTaskIntent',
  (params) async {
    final title = params['title'] as String;
    // Process the intent...
    return {'taskId': 'new-task-id'};
  },
);

Entity Queries #

Provide entities for parameter pickers in Shortcuts:

// Query entities by identifiers
appIntents.registerEntityQueryHandler(
  'TaskEntity',
  (identifiers) async {
    final tasks = await database.getTasksByIds(identifiers);
    return tasks.map((t) => {
      'id': t.id,
      'title': t.title,
    }).toList();
  },
);

// Provide suggested entities
appIntents.registerSuggestedEntitiesHandler(
  'TaskEntity',
  () async {
    final recentTasks = await database.getRecentTasks(limit: 10);
    return recentTasks.map((t) => {
      'id': t.id,
      'title': t.title,
    }).toList();
  },
);

Intent Execution Stream #

Listen to intent executions reactively:

appIntents.onIntentExecution.listen((request) {
  print('Intent ${request.identifier} executed');
  print('Parameters: ${request.params}');
});

iOS Configuration #

  1. Set iOS deployment target to 17.0+ in ios/Podfile:
platform :ios, '17.0'
  1. See the full documentation for complete iOS setup instructions including Swift code generation.

License #

MIT License - see the LICENSE file for details.

0
likes
150
points
29
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter plugin for iOS App Intents and Android AppFunctions integration. Enables Siri, Shortcuts, Spotlight, and AI agent support.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on app_intents

Packages that implement app_intents