app_intents_annotations 0.1.0 copy "app_intents_annotations: ^0.1.0" to clipboard
app_intents_annotations: ^0.1.0 copied to clipboard

Annotations for defining iOS App Intents in Flutter. Use with app_intents and app_intents_codegen.

example/app_intents_annotations_example.dart

import 'package:app_intents_annotations/app_intents_annotations.dart';

// Example Intent specification
@IntentSpec(
  identifier: 'com.example.CreateTaskIntent',
  title: 'Create Task',
  description: 'Creates a new task',
)
class CreateTaskIntentSpec extends IntentSpecBase<void, void> {
  @IntentParam(title: 'Title')
  final String title;

  @IntentParam(title: 'Due Date', isOptional: true)
  final DateTime? dueDate;

  const CreateTaskIntentSpec({required this.title, this.dueDate});
}

void main() {
  // Example usage - annotations are processed at build time
  const intent = CreateTaskIntentSpec(title: 'Example Task');
  print('Intent identifier: ${intent.title}');
}
0
likes
160
points
110
downloads

Publisher

unverified uploader

Weekly Downloads

Annotations for defining iOS App Intents in Flutter. Use with app_intents and app_intents_codegen.

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MIT (license)

More

Packages that depend on app_intents_annotations