AndroidAdapter class

The Android file-first adapter (decision D0/D13, #2285): the base res/values/strings.xml is the truth. sync uploads it plus each values-<qualifier>/strings.xml under its language, and pull writes the translated values-<qualifier>/ files into the same res/, never onto the base. No extractor: the strings already live in resources.

Constructors

AndroidAdapter()
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
mode is what resolveMode returned.
detect(String root) → bool
A Gradle or manifest marker AND a base resources file. A strings.xml alone is a file any tool may have dropped; a Flutter app carries both halves under android/, and the order of the adapters keeps it Flutter.
doctorChecks({required String root, required String sourcePath, required Easyi18nConfig config, required DoctorFindings findings}) → Future<void>
Read-only, offline and free (the StackAdapter contract).
initSteps(InitContext context, Easyi18nConfig config) → void
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
Mode B is the Dart runtime SDK, which an Android app cannot call.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

localeOfValuesDir(String name) → String?
The locale a values-<qualifiers> directory name holds (values-zh-rTW is zh-TW, values-b+zh+Hant is zh-Hant), or null when it names none (values, values-night). The server reads the same rule from the file name it is sent.
sourcesIn(String root) → List<String>
Every res/values/strings.xml under root, relative with forward slashes, best pick first: a main source set, then the shallowest, then by path. The order never comes from listSync.
targetsIn(String resDir) → List<({File file, String lang})>
Every values-<locale>/strings.xml in resDir, by language.
translatableKeys(String content) → int?
The <string> and <plurals> resources of content a sync imports (not translatable="false"), or null without a <resources> root.