XcstringsAdapter class

The file-first adapter (decision D0/D13): the translation catalog the project already owns is the truth, not the calls in the source. init writes a config pointing at it, sync uploads it and writes the translated one back, and doctor grades the file rather than a runtime wiring the stack has no way to use.

Constructors

XcstringsAdapter()
const

Properties

family → String
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stack → String
no setter

Methods

agentsMdSection(Easyi18nConfig config) → String
The stack's own section of the AGENTS.md block: Markdown, one trailing newline.
configDefaults(String root, String mode, void report(InitStep)) → StackConfigDefaults
The two settings that make a config file-first, reported as a step so the pick is in the transcript rather than only in the written file.
detect(String root) → bool
An Xcode project AND a catalog to sync. Both halves are load-bearing: a .xcodeproj alone is every Flutter app (ios/Runner.xcodeproj), and a lone .xcstrings is a file any tool may have dropped.
doctorChecks({required String root, required String sourcePath, required Easyi18nConfig config, required DoctorFindings findings}) → Future<void>
Read-only, offline and free (the StackAdapter contract): every answer comes from the config and the catalog on disk.
initSteps(InitContext context, Easyi18nConfig config) → void
Nothing to scaffold: the catalog is the project's own file and the only derived state is the core's .easyi18n/ cache. Reporting the catalog is the whole step list — a re-run of init says whether the configured path still resolves, which is what an idempotent second run is for.
nextCommand(Easyi18nConfig config) → String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveMode(String root, String? flagMode, void report(InitStep)) → String
File-first is Mode A by construction: Mode B is the Dart runtime SDK (context.tr(), Easyi18nScope, OTA bundles), which an Xcode target cannot call. Honouring --mode b here would write a config whose only effect is to turn off the coverage grading doctor does for Mode A.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

catalogsIn(String root) → List<String>
Every catalog under root a sync could own, relative to it, best pick first: kXcstringsCatalogName before any other name, then the shallowest, then alphabetical.
xcodeProjectIn(String root) → String?
The .xcodeproj / .xcworkspace bundle at the root of root, or null. Only the top level: the copies inside a Flutter app live under ios/ and macos/, and finding one of those would claim every Flutter project.