app_intents_codegen 0.6.1
app_intents_codegen: ^0.6.1 copied to clipboard
Code generator for Flutter AppIntents. Produces Swift and Dart code from @IntentSpec and @EntitySpec annotations.
0.6.1 #
- Fix: Map
IntentFile/IntentFile?toString/String?in KotlinGenerator for KSP compatibility (#11)- KSP compiler does not support
IntentFileas@AppFunctionparameter type - File parameters now generate
mapOf("path" to value)for Dart-sideIntentFile.fromMap()compatibility
- KSP compiler does not support
- Documentation fixes: correct outdated code examples and API references
0.6.0 #
- BREAKING: Remove
inputType/outputTypefromIntentInfomodel - Generate type-safe
XxxParamsclass for each intent with parametersfromMap(Map<String, dynamic>)for MethodChannel / cache modefromQueryParameters(Map<String, String>)for URL scheme deep links- Supports String, int, double, bool, DateTime, IntentFile types
- Handler registration now uses Params class and always returns empty map
- Remove
_extractTypeArguments()from IntentAnalyzer
0.5.2 #
- Fix Swift 6 strict concurrency errors in
FlutterBridge.swiftwhen used as SPM package- Add
sendingkeyword to all non-Sendable parameters and return types crossing actor boundaries - Affects
invoke(),queryEntities(),suggestedEntities(), and all executor/handler closures
- Add
0.5.1 #
- Add root
Package.swiftso AppIntentsBridge can be fetched via standard SPM from repository URL
0.5.0 #
- Fix AppShortcut phrase
{paramName}to generate\(\.$paramName)Swift syntax - Add
imageNamesupport in@EnumCaseDisplaycode generation (asset bundle image) - Add
displayImageNamesupport in@EntitySpecfor entityDisplayRepresentationimage- Static image via
named:for entity type, per-instance@EntityImageviasystemName:takes priority
- Static image via
- Add
EnumerableEntityQueryextension generation whenenumerable: true - Add
IndexedEntityextension generation whenindexed: true(iOS 26+,import CoreSpotlight) - Update
EnumAnalyzerto extractimageNamefrom@EnumCaseDisplay - Update
EntityAnalyzerto extractdisplayImageName,indexed,enumerablefrom@EntitySpec - 189 tests (28 new tests for all new features)
0.4.1 #
- Widen dependency constraints to resolve conflicts with other codegen packages (e.g.,
go_router_builder)source_gen: ">=2.0.0 <5.0.0"(was^2.0.0)analyzer: ">=7.0.0 <11.0.0"(was^7.0.0)build: ">=2.4.0 <5.0.0"(was^2.4.0)build_test: ">=2.2.0 <4.0.0"(was^2.2.0)
- Migrate to
TypeChecker.fromUrl()for compatibility with source_gen 4.x - Migrate to
LibraryElement.classes/.enumsAPI for compatibility with analyzer 10.x - Fix nullable
element.namehandling for analyzer 10.x
0.4.0 #
- Add
supportedModessupport in SwiftGenerator- Generates
@available(iOS 26.0, *) static var supportedModes: IntentModes { .foreground } - Generates
static var openAppWhenRun: Bool { true }for backward compatibility - Both properties generated when
supportedModes: foregroundorurlSchemeis set
- Generates
- Add
IntentFileparameter support in SwiftGenerator@Parameter(supportedTypeIdentifiers:)for file type parameters- File serialization code generation (write to temp file, extract path/mimeType/filename)
import UniformTypeIdentifierswhen file params present
- Add cache mode in SwiftGenerator (
_writeCachePerformMethod)- Auto-generated when
supportedModes: foregroundwithouturlScheme - Caches params to UserDefaults via
AppIntentsPlugin.setPendingAction() processPendingActions()delivers cached actions via existingexecuteIntentmechanism
- Auto-generated when
- Add
IntentFile.fromMap()extraction in DartGenerator for file parameters - Fix: Use
Map.from()for IntentFile params from MethodChannel (avoid type cast errors) - Add
IntentModeTypeenum andfileTypefield to codegen models - Update IntentAnalyzer to parse
supportedModesandfileTypeannotations
0.3.0 #
- Add
KotlinGeneratorfor Android AppFunctions code generation@AppFunction(isDescribedByKdoc = true)annotated methods@AppFunctionSerializabledata classes for entitiesAppFunctionsBridgesingleton for MethodChannel communication- Enum class generation with
fromValue()companion object
- Add CLI command
generate_kotlinfor Kotlin file output - Extract shared
analyzeSources()utility for Swift/Kotlin CLI commands - 154 tests (38 new Kotlin generator tests)
- Update documentation for cross-platform support
0.2.1 #
- Documentation updates to reflect v0.2.0 features
- No code changes
0.2.0 #
- BREAKING: Raise iOS minimum to 17.0
- Add
IntentResult & ProvidesDialogsupport viaresultDialogTemplate - Add
ParameterSummarygeneration viaparameterSummary - Add
AppEnumcode generation (@EnumSpec,EnumAnalyzer,_generateEnumBody) - Add entity image support in
DisplayRepresentation(SF Symbol icons) - Add
{applicationName}to\(.applicationName)phrase conversion for AppShortcuts - Fix AppShortcutsProvider to use Swift result builder pattern (no array literals)
- Fix error handling:
throw AppIntentError.custom(...)instead of silentreturn .result() - Fix double-quote escaping in dialog templates
- Fix shortcut
intentIdentifiertoclassNameresolution in CLI - 116 tests covering all analyzers, generators, and builder
0.1.0 #
- Initial release
IntentAnalyzerandEntityAnalyzerfor annotation parsingShortcutAnalyzerfor@AppShortcutand@AppShortcutsProvidersupportSwiftGeneratorfor iOS 17+ App Intent Swift code generationDartGeneratorfor handler initialization code generation- CLI tool
generate_swiftfor Swift code output - Integration with
build_runnerviaAppIntentsBuilder