A collection of packages for integrating iOS App Intents and Android AppFunctions frameworks with Flutter applications.
Flutter Intents enables Flutter apps to integrate with iOS App Intents (Siri, Shortcuts, Spotlight) and Android AppFunctions (Gemini, AI agents) through declarative annotations and automatic native code generation.
- Declarative Intent Definition: Define App Intents using Dart annotations
- Type Safety: Compile-time type checking via generated Params classes
- Code Generation: Automatic Swift and Kotlin code generation from Dart definitions
- Cross-Platform: iOS App Intents + Android AppFunctions from one codebase
flutter_intents/
├── packages/
│ ├── app_intents_annotations/ # Annotation definitions
│ ├── app_intents/ # Flutter plugin
│ └── app_intents_codegen/ # Code generator
├── app/ # Example app
├── ios-spm/ # iOS Swift Package
└── docs/ # Documentation
| Package | Description |
|---|---|
| app_intents | Flutter plugin for iOS App Intents and Android AppFunctions |
| app_intents_annotations | Annotations for defining intents and entities |
| app_intents_codegen | Swift, Kotlin, and Dart code generator |
dependencies:
app_intents: ^0.7.5
app_intents_annotations: ^0.7.5
dev_dependencies:
app_intents_codegen: ^0.7.5
build_runner: ^2.4.0import 'package:app_intents_annotations/app_intents_annotations.dart';
@IntentSpec(
identifier: 'CreateTaskIntent',
title: 'Create Task',
description: 'Create a new task',
)
class CreateTaskIntentSpec extends IntentSpecBase {
@IntentParam(title: 'Title')
final String title;
@IntentParam(title: 'Due Date', isOptional: true)
final DateTime? dueDate;
CreateTaskIntentSpec({required this.title, this.dueDate});
}@EntitySpec(
identifier: 'TaskEntity',
title: 'Task',
pluralTitle: 'Tasks',
)
class TaskEntitySpec extends EntitySpecBase<Task> {
@EntityId()
String id(Task task) => task.id;
@EntityTitle()
String title(Task task) => task.title;
@EntitySubtitle()
String? subtitle(Task task) => task.description;
}# Generate Dart code
dart run build_runner build --delete-conflicting-outputs
# Generate Swift code (iOS)
dart run app_intents_codegen:generate_swift -i lib -o ios/Runner/GeneratedIntents
# Generate Kotlin code (Android)
dart run app_intents_codegen:generate_kotlin -i lib -o android/app/src/main/kotlin/com/example/app/generated -p com.example.app.generated- Architecture - Design philosophy and system overview
- Package Details - Detailed package specifications
- Usage Guide - Implementation guide and examples
- Dart SDK: ^3.10.0
- Flutter: 3.3+
- iOS: 17.0+ (App Intents), Swift 5.9+
- Android: API 36+ (Android 16, AppFunctions)
See CONTRIBUTING.md for guidelines on how to contribute.
MIT License - see the LICENSE file for details.